This might also help:
Before you begin, make sure the table is not in use. Then use the isql utility to perform these manual steps, entering go after each command:
1.
Turn on support for making changes to tables:
sp_configure "allow updates to system tables", 1
2.
Enter these commands to make the database writable:
use database-name
3.
Enter the following commands and write down the ID numbers:
*
For the database ID:
select db_id database-name
*
For the ID of the corrupt table:
select id from sysobjects where name = bad-table-name
*
For the table's index IDs:
select indid from sysindexes where id = bad-table-id
4.
Optional but highly recommended step. Mark the start of a user-defined transaction:
begin tran
5.
Delete all system catalog information for the object, including any object and procedure dependencies by creating and using all of this short script:
declare @obj int
select @obj = id from sysobjects where name = bad-table-name
delete syscolumns where id = @obj
delete sysindexes where id = @obj
delete sysobjects where id in (select constrid from sysconstraints where
tableid = @obj)
delete sysdepends where depid = @obj
delete syskeys where id = @obj
delete syskeys where depid = @obj
delete sysprotects where id = @obj
delete sysconstraints where tableid = @obj
delete sysreferences where tableid = @obj
delete sysattributes where object = @obj
delete syspartitions where id = @obj
Note:
If you make a mistake, cancel the transaction using the rollback command; and then correct and submit the script again.
6.
Mark the end of the transaction:
commit tran
7.
Prepare to run dbcc, using the undocumented and unsupported option extentzap. Make the database read-only by submitting each of the following commands:
use master
sp_dboption database-name, read only, true
use database-name
checkpoint
WARNING!
When you execute dbcc extentzap, it deletes all extents for a given object ID and indid. The only way to recover the data is to use a database backup.
8.
Run dbcc extentzap twice for each index. Remember that if the table has a clustered index, you also need to delete extents on index 0, even though that indid has no sysindexes entry. Using the following syntax, be very careful to use the correct object ID; that is, the object ID of the bad table:
dbcc traceon(3604)
/* to see the errors */
dbcc extentzap (database-id, object-id, index-id, 0)
dbcc extentzap (database-id, object-id, index-id, 1)
9.
Clean up using the following commands:
use master
sp_dboption database-name, read only, false
sp_configure allow, 0
reconfigure
use database-name
checkpoint
http://www.pcfixreview.com