ScriptingOptions ScriptingOptions ScriptingOptions Class

Definition

Instance class encapsulating SQL Server database

public sealed class ScriptingOptions
type ScriptingOptions = class
Public NotInheritable Class ScriptingOptions
Inheritance
ScriptingOptionsScriptingOptionsScriptingOptions

Constructors

ScriptingOptions() ScriptingOptions() ScriptingOptions()

Default constructor. Sets all default options.

ScriptingOptions(ScriptingOptions) ScriptingOptions(ScriptingOptions) ScriptingOptions(ScriptingOptions)

Copy constructor.

ScriptingOptions(ScriptOption) ScriptingOptions(ScriptOption) ScriptingOptions(ScriptOption)

Creates a ScriptingOptions object with a single option set.

Properties

AgentAlertJob AgentAlertJob AgentAlertJob

Whether to include scripting Agent Alert jobs

AgentJobId AgentJobId AgentJobId

Whether to include scripting Agent job id

AgentNotify AgentNotify AgentNotify

Whether to include scripting Agent notifications

AllowSystemObjects AllowSystemObjects AllowSystemObjects

Whether system objects are scripted

AnsiFile AnsiFile AnsiFile

If set will create an ANSI file in which to write the script results.

AnsiPadding AnsiPadding AnsiPadding

Whether ansi padding scripts are included

AppendToFile AppendToFile AppendToFile

Appends to file instead of overwriting it.

BatchSize BatchSize BatchSize

The number of statements after which to script batch terminator

Bindings Bindings Bindings
ChangeTracking ChangeTracking ChangeTracking

Whether to include Change Tracking options

ClusteredIndexes ClusteredIndexes ClusteredIndexes
ColumnStoreIndexes ColumnStoreIndexes ColumnStoreIndexes
ContinueScriptingOnError ContinueScriptingOnError ContinueScriptingOnError

Whether execution should continue on scripting error

ConvertUserDefinedDataTypesToBaseType ConvertUserDefinedDataTypesToBaseType ConvertUserDefinedDataTypesToBaseType

Whether user defined data types are converted to base type

DdlBodyOnly DdlBodyOnly DdlBodyOnly
DdlHeaderOnly DdlHeaderOnly DdlHeaderOnly
Default Default Default
DriAll DriAll DriAll
DriAllConstraints DriAllConstraints DriAllConstraints
DriAllKeys DriAllKeys DriAllKeys
DriChecks DriChecks DriChecks
DriClustered DriClustered DriClustered
DriDefaults DriDefaults DriDefaults
DriForeignKeys DriForeignKeys DriForeignKeys
DriIncludeSystemNames DriIncludeSystemNames DriIncludeSystemNames

Whether to include system names for constraints

DriIndexes DriIndexes DriIndexes
DriNonClustered DriNonClustered DriNonClustered
DriPrimaryKey DriPrimaryKey DriPrimaryKey
DriUniqueKeys DriUniqueKeys DriUniqueKeys
DriWithNoCheck DriWithNoCheck DriWithNoCheck
Encoding Encoding Encoding
EnforceScriptingOptions EnforceScriptingOptions EnforceScriptingOptions
ExtendedProperties ExtendedProperties ExtendedProperties

Whether extended properties are scripted

FileName FileName FileName
FullTextCatalogs FullTextCatalogs FullTextCatalogs
FullTextIndexes FullTextIndexes FullTextIndexes
FullTextStopLists FullTextStopLists FullTextStopLists
IncludeDatabaseContext IncludeDatabaseContext IncludeDatabaseContext

Whether use database script are included

IncludeDatabaseRoleMemberships IncludeDatabaseRoleMemberships IncludeDatabaseRoleMemberships

Whether binding memberships are included

IncludeFullTextCatalogRootPath IncludeFullTextCatalogRootPath IncludeFullTextCatalogRootPath
IncludeHeaders IncludeHeaders IncludeHeaders

Whether a header containing information about the object being scripted (such as name and time scripted ) is included

IncludeIfNotExists IncludeIfNotExists IncludeIfNotExists

Whether an existence check is added

IncludeScriptingParametersHeader IncludeScriptingParametersHeader IncludeScriptingParametersHeader

Whether a header containing information about the scripting parameters is included

Indexes Indexes Indexes
LoginSid LoginSid LoginSid

Whether security identifier (SID) is included

NoAssemblies NoAssemblies NoAssemblies
NoCollation NoCollation NoCollation

Whether collation details are excluded

NoCommandTerminator NoCommandTerminator NoCommandTerminator
NoExecuteAs NoExecuteAs NoExecuteAs

Whether to exclude EXECUTE AS statements

NoFileGroup NoFileGroup NoFileGroup
NoFileStream NoFileStream NoFileStream

Whether to exclude filestream filegroups

NoFileStreamColumn NoFileStreamColumn NoFileStreamColumn

Whether to include filestream column

NoIdentities NoIdentities NoIdentities

Whether identities are excluded

NoIndexPartitioningSchemes NoIndexPartitioningSchemes NoIndexPartitioningSchemes
NoMailProfileAccounts NoMailProfileAccounts NoMailProfileAccounts

Whether mail accounts are excluded

NoMailProfilePrincipals NoMailProfilePrincipals NoMailProfilePrincipals

Whether mail account principals are excluded

NonClusteredIndexes NonClusteredIndexes NonClusteredIndexes
NoTablePartitioningSchemes NoTablePartitioningSchemes NoTablePartitioningSchemes
NoVardecimal NoVardecimal NoVardecimal
NoViewColumns NoViewColumns NoViewColumns
NoXmlNamespaces NoXmlNamespaces NoXmlNamespaces

Whether XmlNamespaces are included for data types

OptimizerData OptimizerData OptimizerData

Whether to include OptimizerData

Permissions Permissions Permissions

Whether permissions are included

PrimaryObject PrimaryObject PrimaryObject
SchemaQualify SchemaQualify SchemaQualify

Whether object names are schema qualified

SchemaQualifyForeignKeysReferences SchemaQualifyForeignKeysReferences SchemaQualifyForeignKeysReferences

Whether referenced table names are schema qualified

ScriptBatchTerminator ScriptBatchTerminator ScriptBatchTerminator
ScriptData ScriptData ScriptData

Whether data is included

ScriptDataCompression ScriptDataCompression ScriptDataCompression

Whether to include Data Compression options

ScriptDrops ScriptDrops ScriptDrops

Scripts DROP statemens for the objects.

ScriptForAlter ScriptForAlter ScriptForAlter

Scripts ALTER statement for the objects.

ScriptForCreateDrop ScriptForCreateDrop ScriptForCreateDrop

Scripts DROP and Create statement for the objects.

ScriptOwner ScriptOwner ScriptOwner

Whether owner statements are included

ScriptSchema ScriptSchema ScriptSchema

Whether metadata script are included

SpatialIndexes SpatialIndexes SpatialIndexes
Statistics Statistics Statistics
TargetDatabaseEngineEdition TargetDatabaseEngineEdition TargetDatabaseEngineEdition

The server database edition on which the scripts will run.

TargetDatabaseEngineType TargetDatabaseEngineType TargetDatabaseEngineType

The server database engine type on which the scripts will run.

TargetServerVersion TargetServerVersion TargetServerVersion

The server version on which the scripts will run.

TimestampToBinary TimestampToBinary TimestampToBinary

Whether timestamps are converted to binary

ToFileOnly ToFileOnly ToFileOnly
Triggers Triggers Triggers
WithDependencies WithDependencies WithDependencies
XmlIndexes XmlIndexes XmlIndexes

Methods

Add(ScriptOption) Add(ScriptOption) Add(ScriptOption)
Add(ScriptingOptions, ScriptOption) Add(ScriptingOptions, ScriptOption) Add(ScriptingOptions, ScriptOption)
ConvertToSqlServerVersion(ServerVersion) ConvertToSqlServerVersion(ServerVersion) ConvertToSqlServerVersion(ServerVersion)

Converts a ServerVersion into the equivalent SqlServerVersion value

ConvertToSqlServerVersion(Int32, Int32) ConvertToSqlServerVersion(Int32, Int32) ConvertToSqlServerVersion(Int32, Int32)

Converts a Major and Minor version number pair into the equivalent SqlServerVersion

ConvertVersion(Version) ConvertVersion(Version) ConvertVersion(Version)

Method to convert the server version to SqlServerVersion

Remove(ScriptOption) Remove(ScriptOption) Remove(ScriptOption)
SetTargetDatabaseEngineType(DatabaseEngineType) SetTargetDatabaseEngineType(DatabaseEngineType) SetTargetDatabaseEngineType(DatabaseEngineType)

Sets the TargetServerDatabasseEngineType based on a DatabaseEngineType structure.

SetTargetServerVersion(ServerVersion) SetTargetServerVersion(ServerVersion) SetTargetServerVersion(ServerVersion)

Sets the TargetServerVersionInternal based on a ServerVersion structure.

Subtract(ScriptingOptions, ScriptOption) Subtract(ScriptingOptions, ScriptOption) Subtract(ScriptingOptions, ScriptOption)
ToString() ToString() ToString()

Operators

Addition(ScriptingOptions, ScriptOption) Addition(ScriptingOptions, ScriptOption) Addition(ScriptingOptions, ScriptOption)
Subtraction(ScriptingOptions, ScriptOption) Subtraction(ScriptingOptions, ScriptOption) Subtraction(ScriptingOptions, ScriptOption)

Applies to