|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Tuesday, October 06, 2009 11:10 PM
Points: 59,
Visits: 72
|
|
Hello all,
A Production database has 14 secondary files divided over 6 filegroups with one single log file. This database skipped into Suspected mode .The database was then detached . Now we are not able to attach the same.It shows "Attach Database failed with 9004 error (an error occurred while processing the log for database )" .
We tried a workaround as
- Rename the exsisting Data and logfiles.
- Create an empty database with the same name and physical file layout (file,filegroup structure (irrespective of file size) )
- Stop the sql services;
- Swap in the files you want to attach in place of the empty DB files, and start the server
- Put the db in emergency mode using " UPDATE master..sysdatabases SET status=-32768 WHERE name=' ' "
- Put the db in single user mode using sp_dboption
- Run DBCC CHECKDB(dbname,repair_allow_data_loss)
we are encountering error at the last step as "Could not run BEGIN TRANSACTION in database because the database is in bypass recovery mode "
Could you please suggest us a alternative workaround so as the database can be brought online.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 10:09 AM
Points: 5,266,
Visits: 11,197
|
|
do you know why it went into suspect mode?
you're best bet is likely to be restoring the database from a backup before the cause of the suspect status
---------------------------------------------------------------------
|
|
|
|