Results 1 to 5 of 5

Thread: I've done a very silly thing and need help

  1. #1
    Join Date
    Mar 2003
    Posts
    8

    I've done a very silly thing and need help

    After being put in a position where I had to deal with a SQL problem without very little SQL knowledge I have screwed a clients main database up.

    I backed up the transaction log and then deleted the log. The database is shown as suspect and won't let me restore.

    Am I F&%ked?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You have to find the last full backup and restore it, then restore all transaction logs including the one you backed up.

    Here are the steps

    1. RESTORE DATABASE
    2. RESTORE TRANSACTION (s) sequentially with NORECOVERY clause
    3. RESTORE the last TRANSACTION with RECOVERY clause.

  3. #3
    Join Date
    Mar 2003
    Posts
    8
    How do you specify the norecovery clause?

    Ok found that.

    Where is sysdevice held for me to specify the backup device?
    Last edited by MattK; 03-25-2003 at 11:15 AM.

  4. #4
    Join Date
    Mar 2003
    Posts
    8
    It seems they have never backed up before I did the transaction log back up.

    Which would explain why the transaction log was so big.

  5. #5
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    If no backup device was created then you can use DISK clause of RESTORE

    RESTORE DATABASE db FROM DISK='c:\backup\db.bak'

Posting Permissions

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