다음을 통해 공유


CreationScriptOptions Property

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The CreationScriptOptions property specifies creation attributes for database objects implementing a replication article.

구문

object
.CreationScriptOptions [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.

  • value
    Specifies article-implementing object creation as described in Settings.

Settings

Constant

Value

Description

SQLDMOCreationScript_/ClusteredIndexes

16

Includes clustered index creation on tables in the script.

SQLDMOCreationScript_Collation

4096

Replicates column-level collation.

SQLDMOCreationScript_/CustomProcs

2

Generates custom stored procedures for the article if defined (transactional replication only).

SQLDMOCreationScript_/DisableScripting

0

Does not script.

SQLDMOCreationScript_/DRI_Checks

1024

Includes creation of check constraints during creation of tables in the script.

SQLDMOCreationScript_/DRI_Defaults

2048

Includes creation of column defaults during creation of tables in the script.

SQLDMOCreationScript_/DRI_ForeignKeys

512

Includes creation of foreign keys during creation of tables in the script.

SQLDMOCreationScript_/DRI_PrimaryKey

128

Includes definition of primary keys on tables in the script.

SQLDMOCreationScript_/DRI_UniqueKeys

16384

Includes creation of unique keys during creation of tables in the script.

SQLDMOCreationScript_/ExtendedProperties

8192

Replicates extended properties.

SQLDMOCreationScript_/NonClusteredIndexes

64

Includes nonclustered index creation on tables in the script.

SQLDMOCreationScript_/PKUKAsConstraints

32768

Include creation of primary keys and unique keys during creation of tables as constraints instead of as indexes in the script.

SQLDMOCreationScript_/PrimaryObject

1

Includes object creation in the script.

SQLDMOCreationScript_/UDDTsToBaseTypes

32

Converts all user-defined data types to their Microsoft SQL Server base types when columns are defined in table creation in the script.

SQLDMOCreationScript_/UserTriggers

256

Includes creation of triggers during creation of tables in the script.

Data Type

Long, enumerated

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetCreationScriptOptions(
SQLDMO_CREATIONSCRIPT_TYPE* pRetVal);
HRESULT SetCreationScriptOptions(
SQLDMO_CREATIONSCRIPT_TYPE NewValue);

주의

The enumerated value is bit-packed. To specify multiple script creation options, combine individual enumeration values using the OR logical operator to define the behavior required.

When an indexed view is published as an indexed view at a subscriber, only SQLDMOCreationScript_ExtendedProperties, SQLDMOCreationScript_NonClusteredIndexes, and SQLDMOCreationScript_UserTriggers are allowed. SQLDMOCreationScript_ClusteredIndexes and SQLDMOCreationScript_PrimaryObject must also be used.

[!참고]

If an application sets CreationScriptOptions after the initial snapshot has been created, a new snapshot must be generated and reapplied to each subscription. Snapshots are applied when the next scheduled snapshot and distribution or merge agent run.