Help me about Attach database

  • I attach a DB from soucre on Disk then I get an error message from SQL

  • As the message already says, restore the database from the backup.

    Or

    - Detach the database

    - Rename/Move the log file

    - Attach the MDF database file without the LOG file; a new log will be created.

  • johnwalker10 (12/27/2015)


    As the message already says, restore the database from the backup.

    Or

    - Detach the database

    - Rename/Move the log file

    - Attach the MDF database file without the LOG file; a new log will be created.

    Not if the original database wasn't properly detached.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply