Thursday, September 24, 2009

Simultaneous Execution of Two T-SQL Commands May Cause SQL Server Database Corruption

If you work on Microsoft SQL Server, you must know the actual value of T-SQL (Transactional Structured Query Language) commands. These commands help you to access and alter the Master Database File (MDF) in an easy and effective fashion. Other useful features of such commands include absolute control on transactions, error handling and row processing. This is recommended not to use such commands concurrently on same SQL Server database component, because it might cause serious corruption to database or its components. In such situations, the database become inaccessible and you come across critical data loss situations. At this point, to retrieve your valuable data from the database, you are required to carry out SQL Recovery using appropriate tools.

Outcomes of executing two T-SQL command concurrently

When you run two T-SQL commands at the same time on same database, database inconsistencies might occur and you come across some error messages. Take an instance of two T-SQL commands DBCC SHRINKDATABASE and DBCC DBREINDEX, which you run concurrently on any particular database table (Employee) of an SQL Server database. The DBCC SHRINKDATABASE command is used to shrink the database size, whereas DBCC DBREINDEX command is helpful in rebuilding the indexes in database table. In this scenario, you might encounter below error message:

“Error: 8909
Table Corrupt: Object ID 0, index ID 0, page ID (1:623). PageId in the page header = (0:0).”

The moment you encounter above error message, shrink operation on database table gets terminated. Furthermore, the Employee table becomes damaged and inaccessible. It generally occurs due to simultaneous execution of more than one T-SQL commands simultaneously.

In such critical situations, you need to find out the solution, which could perform effective SQL Repair on database and all of its objects. To handle minor consequences in the database table or the database, you can use DBCC CHECKDB command. This is an inbuilt command line utility of MS SQL Server.

However, when the DBCC CHECKDB command can not resolve database corruption problem, you need to go for SQL Recovery using third party tools. These applications are capable of handling most of the MDF file corruption situations.

They use high-end scanning algorithms to throughly scan damaged database and ensure absolute and easy recovery of all the database objects. This SQL Repair software is quite easy to use and thus do not demand sound and prior technical skills.

SQL Recovery is the most advanced and powerful software to successfully recover damaged SQL Server database. It works well with Microsoft SQL Server 2008, 2005 and 2000. This software is compatible with Microsoft Windows Vista, 2003, XP, 2000 and NT.

No comments:

Post a Comment