question

HydNiz avatar image
HydNiz asked

Recover DB definitions from a DB in suspect mode

Currently the database is in Suspect mode. I am not interested in getting the data. but want to all table, view, functions and SP definitions out. Just wondering if there any easy way out as restoring of DB is not a viable option at this point of time. Data can be ETLed in. Thanks.
schemasuspect
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Here are more details. In Emergency mode, DBCC CheckCatalog returns no errors. when I select from Information_schema.Tables - I am getting all rows, but when I execute select from information_schema.columns getting error on only one table. The operating system returned error 1(Incorrect function.) to SQL Server during a read at offset 0x00001eb7560000 How do I recover the database. I can drop that table and is not an issue. Thanks.
0 Likes 0 ·

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
If you're only interested in capturing the structures and you don't care about any of the data, you can try dropping the table from the DAC connection. No guarantees that it will work, but you can try. If it fails, chances are you need to go through recovery.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I got all object definitions out of the sys tables and rebuilt the database. It is not easy task but achievable. DBCC CHECKALLOC and DBCC CHECKCATALOG went thru, but failed on DBCC Checktable failed, but still could not recover the database. Thanks.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.