CreationScriptOptions CreationScriptOptions CreationScriptOptions Enum

Definition

Enumerates schema option values for published articles.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

public enum class CreationScriptOptions
[System.Flags]
public enum CreationScriptOptions
Public Enum CreationScriptOptions
Inheritance
CreationScriptOptionsCreationScriptOptionsCreationScriptOptions
Attributes

Fields

AttemptToDropNonArticleDependencies AttemptToDropNonArticleDependencies AttemptToDropNonArticleDependencies 2147483648

At the Subscriber, attempts to drop dependencies to any objects that are not part of the publication.

ClusteredIndexes ClusteredIndexes ClusteredIndexes 16

Includes the creation of a corresponding clustered index.

Collation Collation Collation 4096

Includes the definition of a column-level collation.

CustomProcedures CustomProcedures 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.

DefaultBindings DefaultBindings DefaultBindings 4194304

Includes default bindings and creation of the bound defaults.

DisableScripting DisableScripting 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.

DriChecks DriChecks DriChecks 1024

Includes the creation CHECK constraints.

DriDefaults DriDefaults DriDefaults 2048

Includes the creation column defaults.

DriForeignKeys DriForeignKeys DriForeignKeys 512

Includes the creation of foreign key constraints to all referenced tables that are included in the publication.

DriPrimaryKey DriPrimaryKey DriPrimaryKey 128

Includes the creation of primary key constraints.

DriUniqueKeys DriUniqueKeys DriUniqueKeys 16384

Includes the creation of unique keys.

ExtendedProperties ExtendedProperties ExtendedProperties 8192

Includes the extended properties associated with the database object being published.

FileGroups FileGroups FileGroups 262144

Includes the filegroups associated with a partitioned table or index.

FileStreamAttribute FileStreamAttribute FileStreamAttribute 4294967296

Includes the attribute for the file stream.

FileStreamDataSpace FileStreamDataSpace 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.

FilteredIndexes FilteredIndexes FilteredIndexes 274877906944

Replicates any filtered indexes on the table. For more information about filtered indexes, see Create Filtered Indexes.

FullTextIndex FullTextIndex FullTextIndex 16777216

Includes full-text indexes.

HierarchyIdToVarBinaryMax HierarchyIdToVarBinaryMax HierarchyIdToVarBinaryMax 137438953472

Converts the hierarchyid data type to varbinary(max) so that columns of type hierarchyid can be replicated to Subscribers that are running SQL Server 2005. For more information about how to use hierarchyid columns in replicated tables, see hierarchyid (Transact-SQL).

Identity Identity 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.

IndexPartitioningSchemes IndexPartitioningSchemes IndexPartitioningSchemes 1048576

Includes the partition scheme associated with a partitioned index.

KeepTimestamp KeepTimestamp 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.

LargeUserDefinedTypesToVarBinaryMax LargeUserDefinedTypesToVarBinaryMax LargeUserDefinedTypesToVarBinaryMax 68719476736

Converts common language runtime (CLR) user-defined types (UDTs) that are larger than 8000 bytes to varbinary(max) so that columns of type UDT can be replicated to Subscribers that are running SQL Server 2005.

MarkReplicatedCheckConstraintsAsNotForReplication MarkReplicatedCheckConstraintsAsNotForReplication 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 MarkReplicatedForeignKeyConstraintsAsNotForReplication 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.

MaxTypesToMatchingNonMaxTypes MaxTypesToMatchingNonMaxTypes MaxTypesToMatchingNonMaxTypes 536870912

Converts nvarchar(max), varchar(max), and varbinary(max) to ntext, text, and image data types, which are supported on earlier versions of SQL Server.

MemoryOptimizedClusteredIndexConversion MemoryOptimizedClusteredIndexConversion MemoryOptimizedClusteredIndexConversion 8796093022208
MemoryOptimizedSchema MemoryOptimizedSchema MemoryOptimizedSchema 4398046511104
NewDateTimeTypesToStrings NewDateTimeTypesToStrings NewDateTimeTypesToStrings 8589934592

Converts date and time data types (date, time, datetimeoffset, and datetime2) introduced in SQL Server 2008 to data types that are supported on earlier versions of SQL Server.

NonClusteredIndexes NonClusteredIndexes NonClusteredIndexes 64

Includes the creation of nonclustered indexes.

NoXmlSchemaCollections NoXmlSchemaCollections NoXmlSchemaCollections 33554432

XML schema collections bound to xml columns are not included.

Permissions Permissions Permissions 1073741824

Includes permissions defined on the published object.

PrimaryKeyUniqueKeyAsConstraints PrimaryKeyUniqueKeyAsConstraints PrimaryKeyUniqueKeyAsConstraints 32768

Generates ALTER TABLE statements when replicating constraints.

PrimaryObject PrimaryObject PrimaryObject 1

Generates a creation script (CREATE TABLE, CREATE PROCEDURE, and so on) for the published object.

RuleBindings RuleBindings RuleBindings 8388608

Includes rule bindings and creation of the bound rules.

Schema Schema Schema 134217728

Generates any schemas not already present on the subscriber.

SparseAttribute SparseAttribute SparseAttribute 2199023255552

Replicates the SPARSE attribute for columns. For more information about this attribute, see Use Sparse Columns.

SpatialIndexes SpatialIndexes SpatialIndexes 1099511627776

Replicates indexes on columns of type geography and geometry.

SpatialTypesToVarBinaryMax SpatialTypesToVarBinaryMax SpatialTypesToVarBinaryMax 549755813888

Converts the geography and geometry data types to varbinary(max) so that columns of these types can be replicated to Subscribers that are running SQL Server 2005.

Statistics Statistics Statistics 2097152

Includes user-defined table statistics.

StorageCompressionSetting StorageCompressionSetting StorageCompressionSetting 17179869184

Replicates the compression option for data and indexes. For more information, see Data Compression.

TablePartitioningScheme TablePartitioningScheme TablePartitioningScheme 524288

Includes the partition scheme associated with a partitioned table.

UserDefinedTypesToBaseTypes UserDefinedTypesToBaseTypes 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.

UserTriggers UserTriggers UserTriggers 256

Includes the creation of user-defined triggers.

XmlIndexes XmlIndexes XmlIndexes 67108864

Includes XML indexes.

XmlToNText XmlToNText XmlToNText 268435456

xml columns are replicated to the Subscriber as ntext.

Remarks

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.

Applies to

See Also