Very confused... Why did a log backup put my DB in recovery?

  • Right... I have an SQL2005 DB, and a network share on another server where the trn file is supposed to go.

    I just issued the following command:

    backup log mydatabase to [mybackupdevice] with norecovery;

    The query returned a success message but...

    Now my DB says '(Restoring...)'

    What the hell? Why did it do that? :blink:

    Please advise, it has been stuck there for nearly an hour now. Good job I tested it on a non critical database before going at the production document management database!

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • its because you used the norecovery option which is used for tail log backups where you intend to restore further logs into you database.

  • ok thanks I shall have to read up on tail logs, so how do I tell it to stop recovering?

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • use

    Restore Database DBNAME with Recovery

    Sorry I should have included this in my initial repsonse.

  • Wrey! that worked thanks 🙂

    I'm still confused as to why doing a BACKUP makes it immeidiately ask to be RESTOREd?!?

    strange. I think I need to do some reading on the matter 😉

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • Cheers 🙂

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

Viewing 7 posts - 1 through 6 (of 6 total)

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