Skip to main content

SQL Full/Differential Backups failing with SQL6 Error

SQL Full/Differential Backups failing with SQL6 Error

Updated this week

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

  1. Verify the backup content:

    1. Ensure that the backup set does not exclude all databases.

    2. Verify if SQL services are running and the instance is properly detected by Phoenix.

  2. Check for indexing corruption:

    1. 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;

    2. If the query fails or returns incorrect results, indexing corruption is likely.

  3. Run integrity checks:

    1. Use the following command:

      DBCC CHECKDB (msdb)

    2. If corruption is confirmed and unresolved by DBCC CHECKDB, proceed to fix the index corruption.

  4. Fix Indexing Corruption:

    1. Request your SQL Database Administrator to rebuild or repair the corrupted indexes.

    2. Use appropriate SQL repair/rebuild strategies (e.g., DBCC DBREINDEX or index drop and recreate procedures).

  5. Re-run the backup:

    1. Once indexing is fixed, re-trigger the backup from the Druva console.

    2. 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.

Did this answer your question?