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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Suspect Mode

Author  Topic 

wesruber
Starting Member

2 Posts

Posted - 2009-04-06 : 14:06:36
Hello,
I'm in need of some help. My database has gone into Suspect Mode, I know why too. Program Files\SQL Server\Log\Database_LOG.ldf was deleted because it go up to 19gigs. How do I get my database out of Suspect mode? I think maybe creating a new Database_Log.ldf file? but how do i do that?

Thanks,

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2009-04-06 : 14:14:25
Once our databases also went into suspect mode , a drive where log files are resided went offline, so all databases went into suspect mode.We had to bring drive online and reattach all databases. I don't know exactly how you can do in your case, but I think bring your databases offline and reattaching to the new log file should work.
Go to Top of Page

wesruber
Starting Member

2 Posts

Posted - 2009-04-06 : 14:26:27
How might I create a new log file and attach it?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-04-06 : 14:28:06
You will need to set your database to Emergency mode, then detach it, then re-attach it as a single file. The following commands should work, but check Books Online for more details before you start:

ALTER DATABASE myDB SET EMERGENCY
exec sp_detach_db 'myDB'
exec sp_attach_single_file_db 'myDB', 'd:\myDB.mdf'
-- change this to match your database name and MDF file path
Go to Top of Page
   

- Advertisement -