RestoreOptions.ReplaceDatabase Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
REPLACE Specifies that SQL Server should create the specified database and its related files even if another database already exists with the same name. In such a case, the existing database is deleted. When the REPLACE option is not specified, a safety check occurs. This prevents overwriting a different database by accident.
public bool ReplaceDatabase { get; set; }
member this.ReplaceDatabase : bool with get, set
Public Property ReplaceDatabase As Boolean
Property Value
true
if [replace database]; otherwise, false
.