Share via


Restore.Script Method

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

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.