Restore Clase
The Restore object provides programmatic access to restore operations.
Espacio de nombres: Microsoft.SqlServer.Management.Smo
Ensamblado: Microsoft.SqlServer.SmoExtended (en Microsoft.SqlServer.SmoExtended.dll)
Sintaxis
'Declaración
Public NotInheritable Class Restore _
Inherits BackupRestoreBase
'Uso
Dim instance As Restore
public sealed class Restore : BackupRestoreBase
public ref class Restore sealed : public BackupRestoreBase
[<SealedAttribute>]
type Restore =
class
inherit BackupRestoreBase
end
public final class Restore extends BackupRestoreBase
Notas
By using a Restore object you can do the following:
Restore all or part of a database.
Restore backup images of transaction log records.
Verify the integrity of backup media.
Report the contents of backup media.
Monitor a restore operation, reporting status to the user.
SQL Server can write a backup to one of four media types: disk, tape, named pipe, or a backup device. SQL Server supports backup striping. A striped backup is one directed to more than a single device. Striping is supported to a single media type only. That is, a backup can be written to two tape devices. Half of a backup cannot be written to a tape device and the other half to a disk.
At a minimum, supply values for a restore source when using a Restore object. Use one media type property to specify the restore operation source.
Setting other properties in the Restore object may be required by the restore operation desired.
Thread Safety
Todos los miembros estáticos (compartidos en Microsoft Visual Basic) públicos de este tipo son seguros para operaciones multiproceso. No se garantiza que los miembros de instancia sean seguros para subprocesos.
To get Restore object properties, users can be a member of the public fixed server role.
To set Restore object properties, users must have CREATE DATABASE permission on the server, or be a member of sysadmin or dbcreator fixed server roles, or be a member of db_owner fixed database role.
To perform a restore operation, users must have CREATE DATABASE permission on the server, or be a member of sysadmin or dbcreator fixed server roles. If the database already exists, then members of the db_owner fixed database role can also perform a restore operation.
Jerarquía de herencia
System. . :: . .Object
Microsoft.SqlServer.Management.Smo. . :: . .BackupRestoreBase
Microsoft.SqlServer.Management.Smo..::..Restore
Seguridad para subprocesos
Todos los miembros públicos static (Shared en Visual Basic) de este tipo son seguros para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.
Vea también