Właściwość Restore.Action
Pobiera lub ustawia typ przywracanie ma być wykonana.
Przestrzeń nazw: Microsoft.SqlServer.Management.Smo
Zestaw: Microsoft.SqlServer.SmoExtended (w Microsoft.SqlServer.SmoExtended.dll)
Składnia
'Deklaracja
Public Property Action As RestoreActionType
Get
Set
'Użycie
Dim instance As Restore
Dim value As RestoreActionType
value = instance.Action
instance.Action = value
public RestoreActionType Action { get; set; }
public:
property RestoreActionType Action {
RestoreActionType get ();
void set (RestoreActionType value);
}
member Action : RestoreActionType with get, set
function get Action () : RestoreActionType
function set Action (value : RestoreActionType)
Wartość właściwości
Typ: Microsoft.SqlServer.Management.Smo.RestoreActionType
A RestoreActionType obiekt reprezentujący typ przywracanie wykonywanej.
Uwagi
SQL Servermożna przywracanie bazy danych, pliki systemu operacyjnego zawierających dane tabela lub indeksu, część lub wszystkie dziennika transakcji bazy danych.
Przykłady
Następujący kod ilustruje przykład sposobu zestaw typu akcja przywracanie skojarzone wystąpienie klasy przywracanie.
VB
Dim rs As Restore
rs = New Restore
rs.Action = RestoreActionType.Files
PowerShell
$rs = new-object Microsoft.SqlServer.Management.Smo.Restore
$rs.Action = [Microsoft.SqlServer.Management.Smo.RestoreActionType]::Files