Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Generates a Transact-SQL script that can be used to re-create the restore operation.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.SmoExtended (in Microsoft.SqlServer.SmoExtended.dll)
Syntax
'Declaration
Public Function Script ( _
server As Server _
) As StringCollection
'Usage
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
Parameters
- server
Type: Microsoft.SqlServer.Management.Smo.Server
A Server object that represents the instance of SQL Server that is targeted by the restore operation.
Return Value
Type: System.Collections.Specialized.StringCollection
A StringCollection system object value that contains a list of Transact-SQL statements in the script.
Remarks
The generated script might contain undocumented, internal procedures, which are required for the complete script output.
Examples
Backing Up and Restoring Databases and Transaction Logs
See Also
Reference
Microsoft.SqlServer.Management.Smo Namespace