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

ATTACHED SUSPECT DATABASE in SQL2008 R2 Expand / Collapse
Author
Message
Posted Monday, November 08, 2010 9:08 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, November 25, 2013 9:16 PM
Points: 43, Visits: 94
hello to all

i would like to ask some assistance for attaching a suspect db a size of 400 gigz, here what happen in our prod DB. we try to run the sqlserver 2008 R2 and we found out that our DB is in suspect mode i dont know what cause then one of the IT personnel detached it while in a suspect mode then he tried to attached but it does not attach at all..is there a way to attach this database? please help we need it badly..

thanks
Post #1017581
Posted Monday, November 08, 2010 10:04 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, April 17, 2014 12:26 PM
Points: 2,742, Visits: 2,953
You need to "hack" the database back into SQL server.

1. Create an empty database on the server to match the real database in size, name, files, etc.
2. Stop SQL Server services.
3. Copy the real database files (mdf,ndf,ldf) to the locations of the empty database you just created.
4. Start SQL Server and the real database should come up suspect.
5. Run ALTER DATABASE <yourdbname> SET EMERGENCY
6. Run DBCC CHECKDB to find out why the database is suspect

If this is a production database you should probably call Microsoft support.
Post #1017591
Posted Monday, November 08, 2010 10:34 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, January 26, 2014 11:13 AM
Points: 2,242, Visits: 3,641
A suspect database should never have been detached!! you can try doing what was suggested in previous post. do you have backups?





Pradeep Singh
Post #1017596
Posted Tuesday, November 09, 2010 12:11 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, April 18, 2014 11:10 PM
Points: 240, Visits: 2,391
Is the last full backup and log file available.If yes then you need to
1)Take a Tail log backup.
2)Create a new database and then restore the full backup.
3)Restore the Tail log backup.
Post #1017630
Posted Tuesday, November 09, 2010 1:19 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, January 26, 2014 11:13 AM
Points: 2,242, Visits: 3,641
sachin-355820 (11/9/2010)
Is the last full backup and log file available.If yes then you need to
1)Take a Tail log backup.

Database has been detached so log file wont be available.
2)Create a new database and then restore the full backup.

No need to create a new database. Restore will be just fine.
3)Restore the Tail log backup.

All subsequent log backups taken after full backup need to be restored in sequence first before restoring tail log backup(if that is available, in this case it is not)





Pradeep Singh
Post #1017653
Posted Sunday, November 18, 2012 3:23 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 04, 2013 7:17 AM
Points: 5, Visits: 30
i had detached suspected database in s2k8R2. i have full backups? problem is i'm not able to attach.
planning to restore the db.plz suggest. it's urgently needed.
Post #1386106
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse