Attach Database without Log File - SQL 2005
Posted on 2008-11-14
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?