SQL database corruption is a common yet horrible case, as you lose access to all your data until repair is done. If you have been a Database Administrator for long, it is quite possible that you have encountered at least one of the forms of database corruption. Corruption cases generally occur due to power surges, corruption in data or indexes, etc.
Luckily, various ways allow you to repair the corrupt database, which is also one of your topmost jobs. At the very first, it should be understood that you must adopt a smart backup strategy. Other workarounds include using DBCC commands and script to ensure the detection and reporting of corruption issues, before allowing them to propagate through the entire infrastructure.
Nevertheless, you may also face situations when you cannot restore the database due to unavailability of backup and failure of other strategies. In such cases, you need to opt for a competent SQL recovery application
like Stellar Phoenix SQL Database Repair that will repair all corrupt database files and recover the data.
When you encounter entire database corruption, you need to create a new database to save the one that you just have repaired. Below given section describes how you can create a new database in different versions of MS SQL Server. Let us proceed.
Following steps will instruct you to create a new database using SQL server management studio.
- Open Microsoft SQL Server Management Studio.
- Use database administrator details and connect to the database engine.
- Expand server node.
- Right-click 'Databases'.
- Select 'New Database', provide the name of the database, and click 'OK'. A new database with the specified name will be created.
- As a new database is available to you, you can save the recovered data in this file.
Note: Make the size of database's data file as large as possible.