Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What exactly does the restore argument "With Replace" do? I'm looking at needing to restore a database back to a beginning point on a regular basis, and I've been trying to figure out if there are any disadvantages to using Restore With Replace versus Dropping/Deleting the database entirely and restoring it.

Will "With Replace" wipe the log files and reset whatever bits might be left in system databases as well? It seems that it would be much quicker, as I don't have to wait for the database to finish dropping (the database in question is around 2TB). I've already checked the TechNet article on the Restore arguments, it doesn't go into this specific question.

share|improve this question
up vote 3 down vote accepted

Paul Randal stated that a restore over the old DB will not require the pages that have identical data to be rewritten. This could save a lot of time, even with IFI enabled.

The "Database Created Date" will be updated if you drop the DB (Kendra Little SQL Webcast with Brent Ozar)

RLF mentioned that it skips certain safety checks.

share|improve this answer

A RESTORE DATABASE ... WITH REPLACE will completely overwrite the database and database log files without the need to drop them first.

On a replace the database settings are also repopulated in master. For example, if a database was in SIMPLE recovery model, but the RESTORE WITH REPLACE was in FULL recovery model, the restored database would still be in FULL recovery mode.

Additional note: RECOVERY can be considered risky, since it skips over certain safety checks. See REPLACE Option Impact at

But if you know your restore is replacing the correct files then it works like a charm.

share|improve this answer
good point on the db settings on a drop vs a non drop. +1. – Ali Razeghi Sep 22 '14 at 21:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.