Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    9

    Angry Unanswered: Rolling back transaction logs database

    I have a Development database and I want to roll it back to Monday morning. I backed up the database and used the command:

    RESTORE DATABASE ITTEST
    FROM ITTEST20040203
    WITH NORECOVERY
    GO

    RESTORE LOG MyNwind
    FROM ITTEST20040203
    WITH RECOVERY, STOPAT = 'FEBRUARY 2, 2004 09:00 AM'
    GO

    The transaction logs have never been truncated.

    But it does not seem to have worked. It this the best way to do a roll back the database or have I missed out something.

    thanks.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    The transaction logs have not been truncated? If you are backing up the transaction logs in a regular way, then the logs are getting truncated after they are backed up 9unless you have transactional replication, then you have to wait for the logreader, and the next log backup).

    What has happened that this did not work? The syntax looks correct to me, assuming the logs are on the same device as your full backup. You may need to add

    with file= nn

    where nn is the file number of the log backup shown by

    restore headeronly from ITTEST20040203

  3. #3
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621

    Re: Rolling back transaction logs database

    Originally posted by BrianMurr
    I have a Development database and I want to roll it back to Monday morning. I backed up the database and used the command:

    RESTORE DATABASE ITTEST
    FROM ITTEST20040203
    WITH NORECOVERY
    GO

    RESTORE LOG MyNwind
    FROM ITTEST20040203
    WITH RECOVERY, STOPAT = 'FEBRUARY 2, 2004 09:00 AM'
    GO

    The transaction logs have never been truncated.

    But it does not seem to have worked. It this the best way to do a roll back the database or have I missed out something.

    thanks.
    By first command you restore database with all transactions and second command does not work at all. If you want to restore database at specified time you have to have full backup and at least one transaction backup - in this case second command will work properly.

Posting Permissions

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