In SQL Server, DBCC SHRINKFILE and DBCC SHRINKDATABASE are the commands, meant to reduce the size of database. These commands can shrink the size of data and log files of the SQL database and hence the user can stay away from most of the problems which can occur due to the large size of database. The process can be done manually or can be set at specified intervals.

But, striking the database integrity, a weird problem has been observed with the SQL database, which undergoes concurrent shrink operations through the specified commands. Specifically, the database which possesses tables without a clustered index can report many corruption problems which needs SQL repair as the cure.

If you apply CHECKDB command to check the database integrity, the following error message may be seen:

Server: Msg 7965, Level 16, State 1, Line 0
Table corrupt: Could not check object ID 1413580074, index ID 0 due to invalid allocation (IAM) page(s).

While, on the application of DBCC CHECKALLOC command, errors may appear like:

Server: Msg 8968, Level 16, State 1, Line 0
Table Corrupt: IAM page (1:1041) (object ID 1413580074, index ID 0) is out of the range of this database.

Or

Server: Msg 8906, Level 16, State 1, Line 0
Page (1:947) in database ID 5 is allocated in the SGAM (1:3) and PFS (1:1), but was not allocated in any IAM. PFS flags ‘MIXED_EXT ALLOCATED 95_PCT_FULL’.

Adding to the corruption symptoms, the usual operations with the database such as SELECT, DELETE, UPDATE and others may also not become successful. But, instead, you may get 5180 error which declares table or database as corrupted. tempdb may found to grow in unusual sense. So this is recommended that you should always serialize the shrink commands on the database to prevent corruption.

For the present situation of database corruption, perform SQL recovery with REPAIR option using DBCC CHECKDB or CHECKALLOC. But, if this MDF repair way fails, third party applications are here for your help. MDF recovery software scan and repair corrupted database with the safe procedure. They are worth for each database corruption problem.

SQL repair needs skills in the software and Stellar Phoenix SQL Database Recovery performs this job well. With its advanced MDF recovery algorithms, the application scans and repairs the corrupted database effectively.

This MDF repair software supports SQL Server 2000 and 2005 and proves effective for SQL recovery for all the database objects.