Avatar of Carla Romere
Carla Romere
Flag for United States of America asked on

DBCC REBUILD_LOG equivalent in MSSQL 2005

I have an Openfire database that was originally installed on sql 2000 that periodically just goes haywire and lands itself in SUSPECT status, PENDING RECOVERY. I have a series of commands I run that resolve the problem. My issue now, is we've moved this to a 2005 server and one of the commands isn't working. This is the command I used to use:

DBCC REBUILD_LOG(Openfire,'D:\Databases\Openfire_Log.ldf')

That command was apparently retired with sql2000. How do I accomplish the same thing in sql2005?
Microsoft SQL Server

Avatar of undefined
Last Comment
Carla Romere

8/22/2022 - Mon

i think the command DBCC REBUILD_LOG has replaced with attach_rebuild_log in sql server 2005..

try the following snippet

CREATE DATABASE AdventureWorks2008R2

ON (FILENAME = ‘D:\SQLData\AdventureWorks2008R2_Data.mdf‘)


Open in new window


replaced with proper quotes!

CREATE DATABASE AdventureWorks2008R2
ON (FILENAME = 'D:\SQLData\AdventureWorks2008R2_Data.mdf')

Open in new window

Carla Romere

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Carla Romere

Found the solution while I was waiting for comments here. The solution worked perfectly and got the database back online.
Your help has saved me hundreds of hours of internet surfing.