SQL is stand for structure query language and SQL server is a database management system which is used to store and manage the data. If you are using Ms SQL database hence corruption is very common issue there. There are many reason of corruption, errors and prevention in SQL database.
Cause of corruption in a MS SQL Database
- Power failure/improper system shutdown
- Media corruption
- Data storage failure where MDB files are stored
- File header corruption
- Hard disk failure
- Storing SQL database in compressed folders
- Computer virus/malware
- Human errors
- Modification in SQL account
- Defective networking device
- Upgrading to SQL server
- Insufficient space
How to avoid MS SQL database from any virus or bug?
- Make use of WAF (web application firewall) to prevent database from any malicious infections.
- Delete unwanted functionality to prevent database from any computer hacker.
- Authenticate all the entered data
- Use static statements, queries or procedure
- Use limited access account
- Change your application password on regular bases to prevent data from hackers.
Here is the manual method to Repair of Ms SQL Database using Rebuild Wizard (Rebuildm.exe)
This is an vital method to repair the master database with the help of Rebuild Wizard. The given wizard is located in the following place:
\Program Files\Microsoft SQL Server\80\Tools\BINN directory.
Step 1: Launch the Rebuild Master by double-clicks
Step 2: A Rebuild Master tab open and here, you will see the Collation Settings and location of data files. Select the database file & verified all other information. And, then click on Rebuild.
Note: Take a copy of the source directory from the SQL CD to your hard drive.
Step 3: Now, you will see the confirmation message. Click on Yes button and after the completion of process, you will receive a message about the rebuild was successful. Now, you have a new master database and you can restore the master database easily.
Step 4: Now, start a SQL Server in SINGLE USER mode by opening up a command prompt and typing the command sqlservr.exe –c -m from the \Program Files\Microsoft SQL Server\MSSQL\BINN\ directory.
Step 5: From a backup, store the master database or you can also store it with the help of Query Analyzer or SQL Enterprise Manager.
Step 6: After restore, exit the SINGLE USER mode and restart SQL Server in NORMAL OPERATION mode.
- If the restore operation failed then try an alternative method. First, rebuild the master database and attach all of your databases by using Enterprise Manager or Query Analyzer.
In Enterprise Manager, right-click on Databases and choose Attach Database.
If the above method did not help you to repair your SQL Database. You would suggest you to try the Free Trial version of Third party Application. Most of company offer Free trial version, Which allow you to repair your SQL database and Show you the Preview of Recover Data. One such application is here which you can try at Free of Cost. You need to pay only when you are completely satisfied with the software.