Método Restore.Script
Generates a Transact-SQL script that can be used to re-create the restore operation.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.SmoExtended (em Microsoft.SqlServer.SmoExtended.dll)
Sintaxe
'Declaração
Public Function Script ( _
server As Server _
) As StringCollection
'Uso
Dim instance As Restore
Dim server As Server
Dim returnValue As StringCollection
returnValue = instance.Script(server)
public StringCollection Script(
Server server
)
public:
StringCollection^ Script(
Server^ server
)
member Script :
server:Server -> StringCollection
public function Script(
server : Server
) : StringCollection
Parâmetros
- server
Tipo: Microsoft.SqlServer.Management.Smo.Server
A Server object that represents the instance of SQL Server that is targeted by the restore operation.
Valor de retorno
Tipo: System.Collections.Specialized.StringCollection
A StringCollection system object value that contains a list of Transact-SQL statements in the script.
Comentários
O script gerado pode conter procedimentos internos não documentados, necessários à saída do script completo.
Exemplos
Fazendo backup e restaurando bancos de dados e logs de transações
Consulte também
Referência
Namespace Microsoft.SqlServer.Management.Smo