Export (0) Print
Expand All

ReplaceDatabase Property

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The ReplaceDatabase property directs a restore operation when a new image of the restored database is required.


object
.ReplaceDatabase [= value]

object

An expression that evaluates to an object in the Applies To list

value

TRUE or FALSE

Boolean

Read/write

HRESULT GetReplaceDatabase(LPBOOL pRetVal);
HRESULT SetReplaceDatabase(BOOL NewValue);

If TRUE, a new image of the database is created. The image is created regardless of the presence of an existing database with the same name.

If FALSE (default), a new image of the database is not created by the restore operation. The database targeted by the restore operation must exist on an instance of Microsoft SQL Server.

Community Additions

ADD
Show:
© 2014 Microsoft