Partager via


Propriété Restore.StandbyFile

Gets or sets the name of an undo file that is used as part of the imaging strategy for an instance of SQL Server.

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.SmoExtended (en Microsoft.SqlServer.SmoExtended.dll)

Syntaxe

'Déclaration
Public Property StandbyFile As String 
    Get 
    Set
'Utilisation
Dim instance As Restore 
Dim value As String 

value = instance.StandbyFile

instance.StandbyFile = value
public string StandbyFile { get; set; }
public:
property String^ StandbyFile {
    String^ get ();
    void set (String^ value);
}
member StandbyFile : string with get, set
function get StandbyFile () : String 
function set StandbyFile (value : String)

Valeur de propriété

Type : System.String
A String that specifies the name of the undo file.

Notes

Database log restoration with undo is available against a read-only image of a SQL Server database and offers one strategy for maintaining a standby image of critical instances.

Exemples

The following code example sets the location of a backup file that can be used as an undo file for the database restore operation.

VB

Dim rs As Restore
rs = New Restore
rs.StandbyFile = "C:\AdventureWorks2012Backup.bak"

PowerShell

$rs = new-object Microsoft.SqlServer.Management.Smo.Restore
$rs.StandbyFile = "C:\AdventureWorks2012Backup.bak"

Voir aussi

Référence

Restore Classe

Espace de noms Microsoft.SqlServer.Management.Smo

Autres ressources

RESTORE (Transact-SQL)

Sauvegarde et restauration des bases de données SQL Server