Results 1 to 3 of 3

Thread: sp_attach_single_file_db Bug!

  1. #1
    John McLaughlin Guest

    sp_attach_single_file_db Bug!

    Ok, we have a db with 2 log files on 2 seprate logical drives.
    We did an sp_detach_db to detach the db.
    When we attepted to do an sp_attach_single_file_db, it looks for the 2nd log file on the other logical drive and will not allow us to proceed.
    Any advice?

    Of course, we deleted the log files....

    Arrgghhh!!!

    john.mclaughlin@alkermes.com

  2. #2
    John McLaughlin Guest

    sp_attach_single_file_db Bug! (reply)

    I'm an idiot.
    The Technet article on Transaction logs states that you cannot use sp_attach_single_file when there have been multiple files. We cannot use sp_attach because we no longer have the .ldf files.
    Is there any way out of this?
    We did do the CREATE command, with no luck.

    Help!!!



    ------------
    John McLaughlin at 6/25/01 1:18:37 AM

    Ok, we have a db with 2 log files on 2 seprate logical drives.
    We did an sp_detach_db to detach the db.
    When we attepted to do an sp_attach_single_file_db, it looks for the 2nd log file on the other logical drive and will not allow us to proceed.
    Any advice?

    Of course, we deleted the log files....

    Arrgghhh!!!

    john.mclaughlin@alkermes.com

  3. #3
    Mark Kemble Guest

    sp_attach_single_file_db Bug! (reply)

    John,

    Have you tried using the sp_attach_db sproc? You may be able to recreate the log files by specifying them in the sp_attach_db statement, for example:
    sp_attach_db @dbname = 'dbname',
    @filename1 = N'c:mssql7datadbname.mdf',
    @filename2 = N'c:mssql7datadbname_log.ldf',
    @filename2 = N'c:mssql7datadbname_log1.ldf'
    If this doesn't work, maybe you can create another database and restore a backup copy of the detached db over it using restore with move, although I don't know if the restore will need the detached db's log files. Good luck . . .

    Mark

    ------------
    John McLaughlin at 6/25/01 9:32:54 AM

    I'm an idiot.
    The Technet article on Transaction logs states that you cannot use sp_attach_single_file when there have been multiple files. We cannot use sp_attach because we no longer have the .ldf files.
    Is there any way out of this?
    We did do the CREATE command, with no luck.

    Help!!!



    ------------
    John McLaughlin at 6/25/01 1:18:37 AM

    Ok, we have a db with 2 log files on 2 seprate logical drives.
    We did an sp_detach_db to detach the db.
    When we attepted to do an sp_attach_single_file_db, it looks for the 2nd log file on the other logical drive and will not allow us to proceed.
    Any advice?

    Of course, we deleted the log files....

    Arrgghhh!!!

    john.mclaughlin@alkermes.com

Posting Permissions

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