Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft