Restore.Action Property
Applies To: SQL Server 2016 Preview
Gets or sets the type of restore to be performed.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.SmoExtended (in Microsoft.SqlServer.SmoExtended.dll)
Syntax
public RestoreActionType Action { get; set; }
public:
property RestoreActionType Action {
RestoreActionType get();
void set(RestoreActionType value);
}
member Action : RestoreActionType with get, set
Public Property Action As RestoreActionType
Property Value
Type: Microsoft.SqlServer.Management.Smo.RestoreActionType
A RestoreActionType object representing the type of restore to be performed.
Remarks
SQL Server can restore a database, one or more operating system files containing table or index data, or part of or all the transaction log of a database.
Examples
Legacy Code Example
The following code example shows how to set the type of restore action associated with the Restore class instance.
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
See Also
Restore Class
Microsoft.SqlServer.Management.Smo Namespace
RESTORE (Transact-SQL)
Back Up and Restore of SQL Server Databases
Return to top