Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
kanth writes "Please help me or give some tips about recovering a suspect database...i have checked to resetting the databse status thru isql...but im not able to recover the data bse...matter is bit urgent please help me!regardsKAN"
The easiest way is to restore from backup. However, the key to getting a suspect DB back is to find out why it is suspect. You need to look in the Error Log (The one for the first time it came up suspect). There will be an error telling you why it is suspect. Until you know that, there is know sure way to know how to resolve the problem.-Chadhttp://www.clrsoft.comSoftware built for the Common Language Runtime.
Glockenspiel
Yak Posting Veteran
50 Posts
Posted - 2003-12-23 : 15:57:48
You might see if detaching and re-attaching it as a single-file db will work.
USE masterEXEC sp_configure 'ALLOW UPDATES', 1UPDATE master..sysdatabases SET status = 32768 WHERE name = [DBNAME]RECONFIGUREUSE [DBNAME]EXEC sp_helpfileEXEC sp_detach_db [DBNAME]EXEC sp_attach_single_file_db @dbname = [DBNAME], @physname = [PHYS FILE NAME FOR DATA SEGMENT]EXEC sp_configure 'ALLOW UPDATES', 0RECONFIGURE