SQL Database Repair

How to Resolve MS SQL Error 8930?


Table of Content

    Summary: When running the DBCC CHECKDB command for repairing a corrupt database, you may get the error 8930. In this post, you will learn how to resolve the error message 8930 in SQL Server. You’ll also get to know an advanced SQL database repair software that can repair corrupt database as well as backup files with ease.

    Read full summary

    MS SQL Server offers DBCC CHECKDB commands to check and repair corrupt or damaged databases. However, sometimes, when you run this command to repair the database, it fails and throws an error. The error message may look like this:

    Msg 8930, Level 16, State 1, Line 1 Database error: Database 1 has inconsistent metadata. This error cannot be repaired and prevents further DBCC processing. Please restore from a backup.

    The error message indicates that corruption in metadata resulted in the failure of the DBCC command. The metadata contains the catalogs and information about the tables. It stores information about the structure and database objects. For example, the system tables contain information about user tables, and the table sys.objects view contains information about tables, stored procedures, views, and other objects.

    This error may occur due to different reasons, like hardware damage, software failure, etc. Let’s see how to fix this error and recover the data from a corrupt database.

    How to Fix MS SQL Error 8930?

    If the metadata is corrupt, you will not be able to work with the database. Unfortunately, you cannot repair the database using the DBCC command when this problem occurs. That is why you need to restore the data from the backup.

    The backup is a file that contains a copy of the data and it also includes the metadata of SQL Server databases. You can restore your database to the date of the backup. If you have a transaction log, you can restore the data by entering the date and time.

    To restore the database from the backup, follow the given steps:

    • Open SQL Server Management Studio (SSMS). 
    • Connect to the SQL Server instance.
    • In Object Explorer, right-click on the Databases option and select the Restore Database option.
    • Select the Device option and then click on ellipses (…) to locate the backup file.
    • Click Add and browse to the location where your backup (.bak) file is located.
    • Select the file and then click OK.
    • Again click on OK to close the Select Backup Devices window.
    • Click OK to restore the database backup.

    Alternatively, you can use the following Transact-SQL command to restore the database backup:

    USE [master];
    GO
    RESTORE DATABASE [StellarDB]
    FROM DISK = N’C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\StellarDB.bak’ WITH  FILE = 1, NOUNLOAD, STATS = 5;
    GO

    What if the Backup is not Available?

    If the backup is corrupt or not available, then the only option is to repair the corrupt database or backup file by using a third-party SQL database repair software, such as Stellar Repair for MS SQL – Technician. This software can easily repair the corrupt SQL Server database backup file and recover all its objects with complete integrity.

    To repair the SQL database backup file using the software, follow these steps:

    • Open the software and select the Extract from MSSQL Backup option.
    Extract from MS SQL Backup option from Stellar Repair for MSSQL Technician Interface
    • Click the Select Backup icon.
    Select Backup option from Stellar Repair for MSSQL interface
    • You will see two options Find and Browse. You can search for the backup file using the Find option if you don’t know the file location. Else, you can click the Browse button and select the backup file.
    Find and Browse option from Stellar Repair for MSSQL interface
    • After selecting the backup file, press the Scan button.
    Click Scan button after selecting the backup file from Stellar Repair for MSSQL Technician Interface
    • Select the Standard Scan mode.
    • Select the data that you want to restore and press Next. If you want to recover only a few tables, you can select individual tables.
    Click NEXT button after selecting data you want to restore
    List of backup files
    • Then, click the Save button.
    Save button from Stellar Repair for MSSQL interface
    • You can save the data in,
    • New database
    • Live database (an existing database)
    • Other formats, such as Excel, CSV, etc. (to save the data of specific tables)
    Saving option from Stellar Repair for MSSQL interface

    Conclusion

    The error 8930 occurs when you try to repair a corrupt database using the DBCC CHECKDB command in SQL Server. This happens when the metadata is damaged or corrupted. In such a case, you cannot repair the database using the DBCC CHECKDB command. So, the only option is to recover the database from a recent healthy backup. However, if the backup is not available or corrupt, you can use Stellar Repair for MS SQL to repair the corrupt database or the backup itself.

    Was this article helpful?

    No NO

    About The Author

    Daniel Calbimonte linkdin

    Daniel Calbimonte is a Microsoft Most Valuable Professional, Microsoft Certified Trainer, and Microsoft Certified IT Professional for SQL Server. He is an accomplished SSIS author, teacher at IT Academies and has over 10 years of experience as a QE and developer for SQL Server related software. He has worked for the government, oil companies, web sites, magazines and universities around the world. Daniel also regularly speaks at SQL Servers conferences and blogs. Read more

    Related Posts

    WHY STELLAR® IS GLOBAL LEADER

    Why Choose Stellar?

    • 0M+

      Customers

    • 0+

      Years of Excellence

    • 0+

      R&D Engineers

    • 0+

      Countries

    • 0+

      PARTNERS

    • 0+

      Awards Received