Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I can't take a backup from a Suspected database .Then I detached that.
Now I try to attach this file.

Then shows a error.

Error :3624
Location: recovery c:2412
SPID : 58
Process ID : 2132

What is the reason , how to resolve?

How to retrieve this data?
Posted
Updated 5-Feb-17 18:35pm
v2

1 solution

Take a look at Here[^]

Here are few steps you can attach your "Suspect Database"

1. Create a new database with the same name and same MDF and LDF files

2. Stop sql server and rename the existing MDF to a new one and copy the original MDF to this location and delete the LDF files.

3. Start SQL Server

4. Now your database will be marked suspect 5. Update the sysdatabases to update to Emergency mode. This will not use LOG files in start up

Sp_configure "allow updates", 1

go
Reconfigure with override

GO
Update sysdatabases set status = 32768 where name = "BadDbName"

go
Sp_configure "allow updates", 0

go
Reconfigure with override

GO

6. Restart sql server. now the database will be in emergency mode

7. Now execute the undocumented DBCC to create a log file

DBCC REBUILD_LOG(dbname,'c:\dbname.ldf')
-- Undocumented step to create a new log file.

(replace the dbname and log file name based on ur requirement)

8. Execute
sp_resetstatus <dbname>


9. Restart SQL server and see the database is online.
 
Share this answer
 
Comments
Dalek Dave 15-Sep-10 9:33am    
Good Call.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900