The CreationScriptOptions property specifies creation attributes for database objects implementing a replication article.
MergeArticle Object | TransArticle Object |
object.CreationScriptOptions [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | Specifies article-implementing object creation as described in Settings |
Constant | Value | Description |
---|---|---|
SQLDMOCreationScript_ ClusteredIndexes |
16 | Include clustered index creation on tables in the script |
SQLDMOCreationScript_ CustomProcs |
2 | Generate custom stored procedures for the article if defined (for transactional replication only) |
SQLDMOCreationScript_ DisableScripting |
0 | Do not script |
SQLDMOCreationScript_DRI_ PrimaryKey |
128 | Include definition of primary keys on tables in the script |
SQLDMOCreationScript_ NonClusteredIndexes |
64 | Include nonclustered index creation on tables in the script |
SQLDMOCreationScript_ PrimaryObject |
1 | Include object creation in the script |
SQLDMOCreationScript_ UDDTsToBaseTypes |
32 | Convert all user-defined data types to their Microsoft® SQL Server™ base types when defining columns in table creation in the script |
The enumerated value is bit-packed. To specify multiple script creation options, combine individual enumeration values using a logical Or to define the behavior desired.
Long, enumerated
Read/write
HRESULT GetCreationScriptOptions(
SQLDMO_CREATIONSCRIPT_TYPE* pRetVal);
HRESULT SetCreationScriptOptions(
SQLDMO_CREATIONSCRIPT_TYPE NewValue);