Link to home
Start Free TrialLog in
Avatar of staugust
staugust

asked on

Attach Database without Log File - SQL 2005

While trying to attach a Database without a logfile with the procedure sp_attach_single_file_db we get the following error message:

The log cannot be rebuilt because the database was not cleanly shut down.

The database is not detached, before the logfile hase been lost.

When we create a new Databse with the same name and path, stop the sql server, replace with the original .mdf and start the sql server, the Database is visible but there are no items in the tree.

While trying to use: ALTER DATABASE Databsename SET EMERGENCY
we get the error: Access denied.

What can we do?
ASKER CERTIFIED SOLUTION
Avatar of pjcoole
pjcoole

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of staugust
staugust

ASKER

(Step 5) How can I let the database attempt to be recovered and how do I go into suspect mode?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial