Problem Description
SQL backups are failing with the following error:
Phoenix SQL agent found no instance/database on the server to backup or the SQL service is not running or the backup content is set to exclude all the databases. (#100030006) (Error Code: SQL6)
Cause
The failure is caused due to corruption in SQL Server indexing, which leads to a failure in fetching backup metadata using a standard SQL query executed by the Phoenix SQL Agent. As a result, the agent assumes that there are no eligible databases for backup.
Traceback
Sample log entries observed:
[2025-06-11 10:14:17,030] [ERROR] Error in executing SQL Query: select database_name Collate SQL_Latin1_General_CP1_CS_AS, max([backup_start_date])from [msdb].[dbo].[backupset]where type='D'and is_copy_only=0 group by database_name Collate SQL_Latin1_General_CP1_CS_AS;SyncError: Phoenix SQL agent found no instance/database on the server to backup or the SQL service is not running or the backup content is set to exclude all the databases. (#100030006) (Error Code: SQL6)
Additional checks:
No related errors were found in the Windows Event Viewer.
The SQL query executed manually returned no data, indicating a metadata access issue.
Running DBCC CHECKDB showed no immediate fix, indicating deeper indexing corruption in SQL system tables.
Resolution
Verify the backup content:
Ensure that the backup set does not exclude all databases.
Verify if SQL services are running and the instance is properly detected by Phoenix.
Check for indexing corruption:
Execute the same SQL query manually to confirm failure:
select database_name Collate SQL_Latin1_General_CP1_CS_AS, max([backup_start_date])
from [msdb].[dbo].[backupset]
where type='D'
and is_copy_only=0
group by database_name Collate SQL_Latin1_General_CP1_CS_AS;
If the query fails or returns incorrect results, indexing corruption is likely.
Run integrity checks:
Use the following command:
DBCC CHECKDB (msdb)
If corruption is confirmed and unresolved by DBCC CHECKDB, proceed to fix the index corruption.
Fix Indexing Corruption:
Request your SQL Database Administrator to rebuild or repair the corrupted indexes.
Use appropriate SQL repair/rebuild strategies (e.g., DBCC DBREINDEX or index drop and recreate procedures).
Re-run the backup:
Once indexing is fixed, re-trigger the backup from the Druva console.
Monitor the logs for confirmation of successful backup completion.
Additional Notes
Always ensure that SQL Agent has proper permissions to access the msdb database and system tables.
Regular maintenance of SQL Server (including index checks) helps prevent such failures.