Object Scripting Constants (SQLDMO_SCRIPT2_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 components, and replication components.

  • Transfer object when the object is being 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

SQLDMOScript2_70Only

16777216

Disables features available in instances of SQL Server so that output is compatible with an instance of SQL Server version 7.0. Disabled features are: column-level collation, user-defined functions, extended properties, Instead of triggers on tables and views, indexes on views, indexes on computed columns, and descending indexes. The default value is OFF.

SQLDMOScript2_AgentAlertJob

2048

Generates a Transact-SQL script creating SQL Server Agent jobs and alerts.

SQLDMOScript2_AgentNotify

1024

When scripting an alert, generates script creating notifications for the alert.

SQLDMOScript2_AnsiFile

2

The generated script file uses multibyte characters. Code page 1252 is used to determine character meaning.

SQLDMOScript2_AnsiPadding

1

Generates Transact-SQL SET ANSI_PADDING ON and SET ANSI_PADDDING OFF statements before and after CREATE TABLE statements in the generated script. It applies only when scripting references a SQL Server table.

SQLDMOScript2_Default

0

No scripting options are specified.

SQLDMOScript2_EncryptPWD

128

Encrypts passwords with script. When this constant is specified, SQLDMOScript2_UnicodeFile must also be specified.

SQLDMOScript2_ExtendedOnly

67108864

Ignores all SQLDMO_SCRIPT_TYPE settings. Use this constant to script extended property settings only. The script may require editing before it is run on the destination database.

SQLDMOScript2_/ExtendedProperty

4194304

Includes extended property scripting as part of object scripting.

SQLDMOScript2_FullTextCat

2097152

The command batch includes Transact-SQL statements creating Microsoft Search full-text catalogs.

SQLDMOScript2_FullTextIndex

524288

The generated script includes statements defining Microsoft Search full-text indexing. It applies only when scripting references a SQL Server table. It ncludes security identifiers for logons scripted.

SQLDMOScript2_JobDisable

33554432

Disables the job at the end of script creation. SQLDMOScript2_PrimaryObject must also be specified.

SQLDMOScript2_LoginSID

8192

Includes security identifiers for logins scripted.

SQLDMOScript2_MarkTriggers

32

The generated script creates replication implementing triggers as system objects. It is reserved for scripting replication articles.

SQLDMOScript2_NoCollation

8388608

Does not script the collation clause if the source is an instance of SQL Server version 7.0 or later. The default is to generate collation.

SQLDMOScript2_NoFG

16

The generated script does not include an 'ON <filegroup>' clause directing filegroup use. It applies only when scripting references a SQL Server table.

SQLDMOScript2_NonStop

8

If an error occurs during script file generation, logs error and continues. It applies when the object and the collection Script method are used. It is reserved for SQL Server utilities.

SQLDMOScript2_/NoWhatIfIndexes

512

Does not script hypothetical indexes used to implement the CREATE STATISTICS statement. It applies only when scripting references a SQL Server table.

SQLDMOScript2_/OnlyUserTriggers

64

The generated script includes Transact-SQL that creates user-defined triggers only. Reserved for scripting replication articles.

SQLDMOScript2_SeparateXPs

256

Script generation creates a second script file that defines the dropping and creation of extended stored procedures. It applies only when scripting stored procedures. It is reserved for SQL Server utilities.

SQLDMOScript2_UnicodeFile

4

The generated script output file is a Unicode-character text file.