Home Forums SQL Server 2005 Backups SQL server 2005 administration (restoring mdf file without ldf) RE: SQL server 2005 administration (restoring mdf file without ldf)

  • Hi,

    thank you for the quick reply.

    I don't think this would work since:

    > new sql server and master or msdb have not clue about the mdf

    > the mdf was ungracefully shutdown without explicit "detach" information

    RUN:

    sp_attach_single_file_db @dbname = 'tool' , @physname = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Tool.mdf'

    RESULT:

    File activation failure. The physical file name "E:\Tool_log.ldf" may be incorrect.

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

    Msg 1813, Level 16, State 2, Line 1

    Could not open new database 'tool'. CREATE DATABASE is aborted.

    JohnE

    Cheers,
    John Esraelo