Object Scripting Constants (SQLDMO_SCRIPT_TYPE)

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Object scripting constants are used by objects and methods that generate a Transact-SQL script as part of an administrative task automated using SQL Distributed Management Objects (SQL-DMO). For example, object scripting constants are used to control the behavior of the:

  • Script method of objects that reference Microsoft SQL Server database objects, agent, and replication components.

  • Transfer object when the transfer object is used to copy database objects and agent components.

  • ScriptDestinationObject method of article objects that define replicated data.

Object scripting constants are used in the context established by the object or method. For more information about object scripting constant context, see the reference for the object or method.

Constant

Value

Description

SQLDMOScript_Aliases

16384

Obsolete.

SQLDMOScript_AppendToFile

256

Object Script method only. It appends to the indicated output file. By default, the Script method overwrites existing file.

SQLDMOScript_Bindings

128

Generates sp_bindefault and sp_bindrule statements. It applies only when scripting references a SQL Server table.

SQLDMOScript_/ClusteredIndexes

8

Generates Transact-SQL defining clustered indexes. It applies only when scripting references a SQL Server table or view.

SQLDMOScript_/DatabasePermissions

32

Generates Transact-SQL database permission defining script. Database permissions grant or deny statement execution rights.

SQLDMOScript_Default

4

SQLDMOScript_PrimaryObj.

SQLDMOScript_DRI_All

532676608

All values defined as SQLDMOScript_DRI_... are combined using an OR logical operator.

SQLDMOScript_DRI_/AllConstraints

520093696

SQLDMOScript_DRI_Checks, SQLDMOScript_DRI_Defaults, SQLDMOScript_DRI_ForeignKeys, SQLDMOScript_DRI_PrimaryKey, and SQLDMOScript_DRI_UniqueKeys are combined using an OR logical operator.

SQLDMOScript_DRI_AllKeys

469762048

SQLDMOScript_DRI_ForeignKeys, SQLDMOScript_DRI_PrimaryKey, and SQLDMOScript_DRI_UniqueKeys are combined using an OR logical operator.

SQLDMOScript_DRI_Checks

16777216

The generated script creates column-specified CHECK constraints. It directs scripting when declarative referential integrity establishes dependency relationships. It applies only when scripting references a SQL Server table.

SQLDMOScript_DRI_Clustered

8388608

The generated script creates clustered indexes. It directs scripting when declarative referential integrity establishes dependency relationships. It applies only when scripting references a SQL Server table.

SQLDMOScript_DRI_Defaults

33554432

The generated script includes column-specified defaults. It directs scripting when declarative referential integrity establishes dependency relationships. It applies only when scripting references a SQL Server table.

SQLDMOScript_DRI_/ForeignKeys

134217728

The generated script creates FOREIGN KEY constraints. It directs scripting when declarative referential integrity establishes dependency relationships. It applies only when scripting references a SQL Server table.

SQLDMOScript_DRI_/NonClustered

4194304

The generated script creates nonclustered indexes. It directs scripting when declarative referential integrity establishes dependency relationships. It applies only when scripting references a SQL Server table.

SQLDMOScript_DRI_/PrimaryKey

268435456

The generated script creates PRIMARY KEY constraints. It directs scripting when declarative referential integrity establishes dependency relationships. It applies only when scripting references a SQL Server table.

SQLDMOScript_DRI_/UniqueKeys

67108864

The generated script creates candidate keys defined using a unique index. It directs scripting when declarative referential integrity establishes dependency relationships. It applies only when scripting references a SQL Server table.

SQLDMOScript_DRIIndexes

65536

When SQLDMOScript_NoDRI is specified, scripts PRIMARY KEY constraints using a unique index to implement the declarative referential integrity. It applies only when scripting references a SQL Server table.

SQLDMOScript_/DRIWithNoCheck

536870912

When SQLDMOScript_DRI_Checks or SQLDMOScript_DRI_ForeignKeys is used the generated script includes the WITH NOCHECK clause optimizing constraint creation. It applies only when scripting references a SQL Server table.

SQLDMOScript_Drops

1

Generates Transact-SQL to remove the referenced component. The script tests for existence of prior attempts to remove the component.

SQLDMOScript_IncludeHeaders

131072

The generated script is prefixed with a header containing date and time of generation and other descriptive information.

SQLDMOScript_/IncludeIfNotExists

4096

Transact-SQL creating a component is prefixed by a check for existence. When the script is executed, the component is created only if a copy of the named component does not exist.

SQLDMOScript_Indexes

73736

SQLDMOScript_ClusteredIndexes, SQLDMOScript_NonClusteredIndexes, and SQLDMOScript_DRIIndexes are combined using an OR logical operator. It applies to both table and view objects.

SQLDMOScript_/NoCommandTerm

32768

Individual Transact-SQL statements in the script are not delimited using the connection-specific command terminator. By default, individual Transact-SQL statements are delimited.

SQLDMOScript_NoDRI

512

Generated Transact-SQL statements do not include any clauses defining declarative referential integrity constraints. It applies only when scripting references a SQL Server table. Use only if the script is to execute on an instance of SQL Server version 4.21.

SQLDMOScript_NoIdentity

1073741824

Generated Transact-SQL statements do not include definition of identity property, seed, and increment. It applies only when scripting references a SQL Server table.

SQLDMOScript_/NonClusteredIndexes

8192

Generates Transact-SQL defining nonclustered indexes. It applies only when scripting references a SQL Server table or view.

SQLDMOScript_None

0

Obsolete.

SQLDMOScript_/ObjectPermissions

2

Includes Transact-SQL permission defining statements when database objects are being scripted.

SQLDMOScript_OwnerQualify

262144

Object names in Transact-SQL generated to remove an object are qualified by the owner of the referenced object. Transact-SQL is generated to create the referenced object and qualify the object name using the current object owner.

SQLDMOScript_Permissions

34

SQLDMOScript_ObjectPermissions and SQLDMOScript_DatabasePermissions are combined using an OR logical operator.

SQLDMOScript_PrimaryObject

4

Generates Transact-SQL creating the referenced component.

SQLDMOScript_SortedData

1048576

Obsolete.

SQLDMOScript_/SortedDataReorg

2097152

Obsolete.

SQLDMOScript_/TimestampToBinary

524288

When object creation is being scripted for a table or a user-defined data type, converts specification of timestamp data type to binary(8).

SQLDMOScript_ToFileOnly

64

Specifies that output is written to a file only and not displayed.

SQLDMOScript_TransferDefault

422143

Default. SQLDMOScript_PrimaryObject, SQLDMOScript_Drops,SQLDMOScript_Bindings, SQLDMOScript_ClusteredIndexes, SQLDMOScript_NonClusteredIndexes, SQLDMOScript_Triggers, SQLDMOScript_ToFileOnly, SQLDMOScript_Permissions, SQLDMOScript_IncludeHeaders, SQLDMOScript_Aliases, SQLDMOScript_IncludeIfNotExists, and SQLDMOScript_OwnerQualify are combined using an OR logical operator.

SQLDMOScript_Triggers

16

Generates Transact-SQL defining triggers. It applies only when scripting references a SQL Server table or view.

SQLDMOScript_/UDDTsToBaseType

1024

Converts specification of user-defined data types to the appropriate SQL Server base data type. It applies only when scripting references a SQL Server table.

SQLDMOScript_/UseQuotedIdentifiers

-1

Uses quote characters to delimit identifier parts when object names are being scripted.