Troubleshooting Guide: SQL Server Error 9972 — Full-Text DDL Command Failure
Why This Error Happens
This error occurs because SQL Server 2025 attempts to execute a full-text DDL command (such as creating or altering a full-text catalog or index) while the target database is still in a transitional state—such as RECOVERING, RESTORING, or SUSPECT—rather than fully ONLINE. Full-text indexing operations require exclusive access to stable database metadata and filegroup structures, which are unavailable until the recovery process completes. This commonly happens when scripts or automated deployment pipelines execute full-text commands immediately after a database restore or attach operation without verifying the database state first.
Step-by-Step Resolution Guide
Step 1: Verify the Current Database State
- Open SQL Server Management Studio (SSMS) or a query window connected to the instance.
- Run the following query to check the database status:
SELECT name, state_desc FROM sys.databases WHERE name = 'YourDatabaseName';
- Confirm whether the
state_desccolumn returnsONLINE,RECOVERING,RESTORING, orSUSPECT.
Step 2: Wait for Recovery or Restore to Complete
- If the state is
RECOVERING, allow SQL Server time to finish the recovery process; large databases or those with long transaction logs may take several minutes. - Monitor progress via the SQL Server Error Log at
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG. - Avoid issuing any full-text DDL commands (
CREATE FULLTEXT CATALOG,CREATE FULLTEXT INDEX) until the state changes toONLINE.
Step 3: Resolve a SUSPECT or Stuck Database
- If the database is stuck in
SUSPECTmode, run:
ALTER DATABASE YourDatabaseName SET EMERGENCY;
DBCC CHECKDB (YourDatabaseName, REPAIR_ALLOW_DATA_LOSS);
ALTER DATABASE YourDatabaseName SET ONLINE;
- Check the underlying data and log files for corruption or access issues in their configured path, typically
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\. - Ensure the SQL Server Service Account has full read/write permissions on this directory.
Step 4: Re-run the Full-Text DDL Command
- Once
state_descconfirmsONLINE, re-execute your original full-text DDL statement. - Example:
CREATE FULLTEXT CATALOG ftCatalog AS DEFAULT;
- Confirm the command completes without triggering Error 9972 again.
Alternative or Verification Steps
- Verify success by querying
sys.fulltext_catalogsandsys.fulltext_indexesto ensure the new objects were created and are listed with ais_enabledstatus of1. - If the database frequently enters a transitional state during automated deployments, add a polling loop in your deployment script that checks
DATABASEPROPERTYEX('YourDatabaseName', 'Status')and waits for anONLINEresult before issuing any full-text commands.