Wednesday, June 17, 2009

Can’t Drop a SQL Server Table

SQL Server database is a collection of tables with typed columns. If due to any reason database tables get corrupt, you can use DBCC CHECKDB command to observe the amount of corruption. A SQL table gets corrupt due to unexpected shutdown, application bugs, virus attack, network faults and similar other reasons. However, to restore lost data, use your recent backup, if available and valid. In case of no backup or invalid backup, commercial MDF Repair applications can help you to repair and restore the damaged database.

One of the typical symptoms that a corrupt SQL Server table shows is that you cannot drop it using DROP TABLE command.

Cause

You cannot drop a corrupt SQL Server table if allocation page is cross-linked. As a result, SQL Server takes it as some data from other tables in the same extent that belong to the affected object. In such cases, if it allows you to drop the table, it might delete data from other tables.

Solution

To correct the abovementioned behavior, try following these methods:
  • Create a new SQL Server database and try copying all objects from affected database. To do so, use BCP or Transfer Manager. You then need to dump or rename the databases.
  • If database is large in size, you can update sysobjects and thus rename the table. After this, create a new database table, leaving the earlier one. Updating sysobjects can corrupt the database more.
  • If above measures don’t give required results, use your recent database backup to restore.
  • In case of backup unavailability or backup errors, use third-party MDF Recovery applications.

MDF Repair software are advanced tools that can examine your damaged SQL databases and repair them. Such software’s are well prepared with informative documentation, enhanced repair options, non-destructive design, and automatic repair feature. MDF Recovery software perform powerful scan of damaged SQL Server database, while maintaining its integrity. These are flexible tools that you can use in any logical case of database corruption.

0 comments:

Post a Comment