Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Attach Database failed with 9004 error.(an error occurred while processing the log for database ) Expand / Collapse
Author
Message
Posted Wednesday, November 28, 2007 12:30 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued 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.



Post #426721
Posted Thursday, November 29, 2007 3:56 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:26 PM
Points: 5,850, Visits: 12,599
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


---------------------------------------------------------------------

Post #427319
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse