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.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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment