Server.Script Method (ScriptingOptions)


Generates a StringCollection of Transact-SQL statements that can be used to re-create the server by using the specified scripting options.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

abstract Script : 
        scriptingOptions:ScriptingOptions -> StringCollection
override Script : 
        scriptingOptions:ScriptingOptions -> StringCollection


Type: Microsoft.SqlServer.Management.Smo.ScriptingOptions

A ScriptingOptions object value that specifies the script options.

Return Value

Type: System.Collections.Specialized.StringCollection

A StringCollection object value that contains a list of Transact-SQL statements in the script.

To generate a script that you can open and run in SQL Server Management Studio set the ScriptingOptionsFileName Property to create a new .sql script file.

Return to top