ReplaceDatabase Property (SQL-DMO)

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

Applies To

Restore Object

Syntax

object.ReplaceDatabase [= value]

Part Description
object Expression that evaluates to an object in the Applies To list
value True or False

Remarks

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 the Microsoft® SQL Server™ installation.

Data Type

Boolean

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetReplaceDatabase(LPBOOL pRetVal);

HRESULT SetReplaceDatabase(BOOL NewValue);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.