Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Posts
    13

    Unanswered: MDF without LDF?

    Hello,

    I tried to attach my MD and or work with the stored procedures but always it is complaining about the log file which is not able to create...

    I tried two options but none is working !!!
    EXEC sp_attach_db @dbname = N'AeXNS_Data',
    @filename1 = N'E:\AeXNS_Data.mdf',
    @Filename2 = N'F:\AeXNS_Log.LDF'
    Server: Msg 5105, Level 16, State 4, Line 1
    Device activation error. The physical file name 'F:\AeXNS_Log.LDF' may be incorrect.


    EXEC sp_attach_single_file_db @dbname = N'AeXNS_data',
    @physname = N'E:\AeXNS_Data.mdf'

    Server: Msg 1813, Level 16, State 2, Line 1
    Could not open new database 'AeXNS_data'. CREATE DATABASE is aborted.
    Device activation error. The physical file name 'F:\AeXNS_Log.LDF' may be incorrect.

    But there is no file with that name AeXNS_Log.LDF as I want to create it from scratch...

    Any ideas?

    Thanks,
    Dom
    __________________

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    have you tried explicitly dettaching use sp_dettach_db before using sp_attach_single_file_db?
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •