CreationScriptOptions Enum
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enumerates schema option values for published articles.
This enumeration supports a bitwise combination of its member values.
public enum class CreationScriptOptions
[System.Flags]
public enum CreationScriptOptions
[<System.Flags>]
type CreationScriptOptions =
Public Enum CreationScriptOptions
- Inheritance
-
CreationScriptOptions
- Attributes
Name | Value | Description |
---|---|---|
DisableScripting | 0 | Object creation scripts are not generated by the Snapshot Agent. You must specify a user-supplied script file to define the object at the Subscriber for CreationScript. |
PrimaryObject | 1 | Generates a creation script (CREATE TABLE, CREATE PROCEDURE, and so on) for the published object. |
CustomProcedures | 2 | Includes the generation of custom stored procedures. This option is only valid for the TransArticle object. You must also specify InsertCommand, UpdateCommand, and DeleteCommand. |
Identity | 4 | Includes the creation of identity columns. This option is supported only for TransArticle objects and only for Microsoft SQL Server 2005 and later releases. For more information, see Replicate Identity Columns. |
KeepTimestamp | 8 | Replicates timestamp columns. Without this option, timestamp columns are created on the Subscriber as binary(16) columns. This option is supported only for TransArticle objects. |
ClusteredIndexes | 16 | Includes the creation of a corresponding clustered index. |
UserDefinedTypesToBaseTypes | 32 | Converts user-defined data types columns at the Publisher to base SQL Server data type columns at the Subscriber. This option is not supported for non-SQL Server Publishers. |
NonClusteredIndexes | 64 | Includes the creation of nonclustered indexes. |
DriPrimaryKey | 128 | Includes the creation of primary key constraints. |
UserTriggers | 256 | Includes the creation of user-defined triggers. |
DriForeignKeys | 512 | Includes the creation of foreign key constraints to all referenced tables that are included in the publication. |
DriChecks | 1024 | Includes the creation CHECK constraints. |
DriDefaults | 2048 | Includes the creation column defaults. |
Collation | 4096 | Includes the definition of a column-level collation. |
ExtendedProperties | 8192 | Includes the extended properties associated with the database object being published. |
DriUniqueKeys | 16384 | Includes the creation of unique keys. |
PrimaryKeyUniqueKeyAsConstraints | 32768 | Generates ALTER TABLE statements when replicating constraints. |
MarkReplicatedCheckConstraintsAsNotForReplication | 65536 | Includes the NOT FOR REPLICATION clause when creating CHECK constraints so that the constraints are not enforced during synchronization. For more information, see Controlling Constraints, Identities, and Triggers with NOT FOR REPLICATION. |
MarkReplicatedForeignKeyConstraintsAsNotForReplication | 131072 | Includes the NOT FOR REPLICATION clause when creating FOREIGN KEY constraints so that the constraints are not enforced during synchronization. For more information, see Controlling Constraints, Identities, and Triggers with NOT FOR REPLICATION. |
FileGroups | 262144 | Includes the filegroups associated with a partitioned table or index. |
TablePartitioningScheme | 524288 | Includes the partition scheme associated with a partitioned table. |
IndexPartitioningSchemes | 1048576 | Includes the partition scheme associated with a partitioned index. |
Statistics | 2097152 | Includes user-defined table statistics. |
DefaultBindings | 4194304 | Includes default bindings and creation of the bound defaults. |
RuleBindings | 8388608 | Includes rule bindings and creation of the bound rules. |
FullTextIndex | 16777216 | Includes full-text indexes. |
NoXmlSchemaCollections | 33554432 | XML schema collections bound to xml columns are not included. |
XmlIndexes | 67108864 | Includes XML indexes. |
Schema | 134217728 | Generates any schemas not already present on the subscriber. |
XmlToNText | 268435456 | xml columns are replicated to the Subscriber as |
MaxTypesToMatchingNonMaxTypes | 536870912 | Converts |
Permissions | 1073741824 | Includes permissions defined on the published object. |
AttemptToDropNonArticleDependencies | 2147483648 | At the Subscriber, attempts to drop dependencies to any objects that are not part of the publication. |
FileStreamAttribute | 4294967296 | Includes the attribute for the file stream. |
NewDateTimeTypesToStrings | 8589934592 | Converts date and time data types ( |
StorageCompressionSetting | 17179869184 | Replicates the compression option for data and indexes. For more information, see Data Compression. |
FileStreamDataSpace | 34359738368 | Set this option to store FILESTREAM data on its own filegroup at the Subscriber. If this option is not set, FILESTREAM data is stored on the default filegroup. Replication does not create filegroups; therefore, if you set this option, you must create the filegroup before you apply the snapshot at the Subscriber. For more information about how to create objects before you apply the snapshot, see Execute Scripts Before and After the Snapshot Is Applied. |
LargeUserDefinedTypesToVarBinaryMax | 68719476736 | Converts common language runtime (CLR) user-defined types (UDTs) that are larger than 8000 bytes to |
HierarchyIdToVarBinaryMax | 137438953472 | Converts the |
FilteredIndexes | 274877906944 | Replicates any filtered indexes on the table. For more information about filtered indexes, see Create Filtered Indexes. |
SpatialTypesToVarBinaryMax | 549755813888 | Converts the |
SpatialIndexes | 1099511627776 | Replicates indexes on columns of type |
SparseAttribute | 2199023255552 | Replicates the SPARSE attribute for columns. For more information about this attribute, see Use Sparse Columns. |
MemoryOptimizedSchema | 4398046511104 | |
MemoryOptimizedClusteredIndexConversion | 8796093022208 |
The schema options for an article control how the published object will created at the Subscriber, and affect how the snapshot script files are generated. For more information, see Publish Data and Database Objects.
Values of the CreationScriptOptions enumeration are equivalent to values of the @schema_option parameter of sp_addarticle (Transact-SQL) and sp_addmergearticle (Transact-SQL).
The CreationScriptOptions enumeration supports the FlagsAttribute option which allows bitwise combination of enumeration values.