Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2005
    Posts
    71

    Unanswered: restore a db without restoring the log...

    i want to restore a database but not the log file.
    the backup has the data and log files in it.
    i tried doing a search for this but kept finding examples about restoring backups that dont have log files. i want to do the opposite.

  2. #2
    Join Date
    Mar 2007
    Location
    Holmestrand, Norway
    Posts
    332
    RESTORE DATABASE ... FROM ... WITH REPLACE, RECOVERY should do.

    REPLACE tells SQL Server to "ignore" the log, and RECOVERY tells it to bring it online when the restore finishes. Note: If you use this approach all data since last log backup is lost, and you'll have to restore the database once more if you later should desire to restore the log.

    I want to point out that this scenario may indicate that you are running a database in full or bulk_logged recovery model, where it should be simple, so you might want to have a look at the different recovery models.
    Ole Kristian Velstadbråten Bangås - Virinco - MSSQL.no - Facebook - Twitter

Posting Permissions

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