📄 sqldmo.h
字号:
typedef SQLDMO_HELPID(SQLDMO_SUBSCRIBER_TYPE) enum {
SQLDMOSubInfo_SQLServer = 0x00000000, // Microsoft SQL Server.
SQLDMOSubInfo_ODBCDatasource = 0x00000001, // ODBC Datasource
SQLDMOSubInfo_JetDatabase = 0x00000002, // JET_DATABASE 3.5 using ODBC without DSN
SQLDMOSubInfo_OLEDBDatasource = 0x00000003, // OLEDB Datasource, Jet Database 4.0
SQLDMOSubInfo_ExchangeServer = 0x00000004 // Exchange server
} SQLDMO_SUBSCRIBER_TYPE;
typedef SQLDMO_HELPID(SQLDMO_INITIALSYNC_TYPE) enum {
SQLDMOInitSync_Unknown = 10, // Pick your favourite invalid number
SQLDMOInitSync_Min = 0,
SQLDMOInitSync_Default = 0,
SQLDMOInitSync_BCPNative = 0, // native mode BCP
SQLDMOInitSync_BCPChar = 1, // character mode BCP
// Post-7.0 additions
SQLDMOInitSync_Concurrent = 3, // Concurrent snapshot, native mode
SQLDMOInitSync_ConcurrentChar = 4, // Concurrent snapshot, char mode, use with AllowDTS, because DTS requires that
SQLDMOInitSync_Max = 4
} SQLDMO_INITIALSYNC_TYPE;
typedef SQLDMO_HELPID(SQLDMO_REPFREQ_TYPE) enum {
SQLDMORepFreq_Unknown = 1000, // Tinyint out-of-range
SQLDMORepFreq_Min = 0,
SQLDMORepFreq_Continuous = 0,
SQLDMORepFreq_Snapshot = 1,
SQLDMORepFreq_Max = 1
} SQLDMO_REPFREQ_TYPE;
typedef SQLDMO_HELPID(SQLDMO_PUBLICATION_TYPE) enum {
SQLDMOPublication_Unknown = 1000, // Tinyint out-of-range
SQLDMOPublication_Min = 0,
SQLDMOPublication_Transactional = 0,
SQLDMOPublication_Snapshot = 1,
SQLDMOPublication_Merge = 2,
SQLDMOPublication_Max = 2
} SQLDMO_PUBLICATION_TYPE;
typedef SQLDMO_HELPID(SQLDMO_ARTICLE_TYPE) enum {
SQLDMORep_Min = 0,
SQLDMORep_LogBased = 0x0001, // Base for all LogBased replication types.
SQLDMORep_ManualFilterProc = 0x0002, // Bit for manually created (not auto-generated) filter proc
SQLDMORep_LogBasedManualFilterProc = 0x0003, // Log based, with manually created filter proc.
SQLDMORep_ManualSyncView = 0x0004, // Bit for manually created (not auto-generated) sync view.
SQLDMORep_LogBasedManualSyncView = 0x0005, // Log based, with manually created sync view.
SQLDMORep_LogBasedVerticalPartition = 0x0006, // Log based, with vertical partition.
SQLDMORep_LogBasedManualBoth = 0x0007, // Log based, with manually created sync view and filter proc.
SQLDMORep_ProcExecution = 0x0008, // stored proc execution
SQLDMORep_SerializableProcExecution = 0x0018, // stored proc exec, must be within serializable xact
SQLDMORep_TableBased = 0x000a, // Table based article.
SQLDMORep_ProcSchemaOnly = 0x0020, // stored proc, schema only
SQLDMORep_ViewSchemaOnly = 0x0040, // view schema only
SQLDMORep_FuncSchemaOnly = 0x0080, // User-defined function, schema only
SQLDMORep_IndexedView = 0x0100, // This bit indicates that the article is an indexed view
SQLDMORep_IndexedViewLogBased = 0x0101, // Indexed view replicated as a table, log based
SQLDMORep_IndexedViewLogBasedManualFilterProc
= 0x0103, // Indexed view replicated as a table, log based, with manual filter
SQLDMORep_IndexedViewLogBasedManualSyncView
= 0x0105, // Indexed view replicated as a table, log based, with manually created sync view
SQLDMORep_IndexedViewLogBasedManualBoth
= 0x0107, // Indexed view replicated as a table, log based, with manually created sync view and filter proc
SQLDMORep_IndexedViewSchemaOnly = 0x0140, // Schema-bound view, replicate schema only
SQLDMORep_Max = 0x0140
} SQLDMO_ARTICLE_TYPE;
typedef SQLDMO_HELPID(SQLDMO_SUBSYNC_TYPE) enum {
SQLDMOSubSync_Unknown = 1000, // Tinyint out-of-range
SQLDMOSubSync_Manual = 0, // not used in 7.0, for upgrade, this will translate to SQLDMOSubSync_Auto
SQLDMOSubSync_Min = 1,
SQLDMOSubSync_Auto = 1,
SQLDMOSubSync_Default = 1, // Auto is default.
SQLDMOSubSync_None = 2,
SQLDMOSubSync_Max = 2
} SQLDMO_SUBSYNC_TYPE;
typedef SQLDMO_HELPID(SQLDMO_PREARTICLE_TYPE) enum {
// Article pre-creation methods on destination table.
SQLDMOPreArt_Min = 0,
SQLDMOPreArt_None = 0, // Do nothing
SQLDMOPreArt_DropTable = 1, // Drop and re-create table
SQLDMOPreArt_DeleteRows = 2, // Delete rows (logged)
SQLDMOPreArt_TruncateTable = 3, // Truncate table (nonlogged)
SQLDMOPreArt_Max = 3
} SQLDMO_PREARTICLE_TYPE;
typedef SQLDMO_HELPID(SQLDMO_ARTSTATUS_TYPE) enum {
SQLDMOArtStat_Min = 0,
SQLDMOArtStat_Inactive = 0,
SQLDMOArtStat_Unsynced = 1,
SQLDMOArtStat_Active = 2,
SQLDMOArtStat_Conflicts = 3,
SQLDMOArtStat_Errors = 4,
SQLDMOArtStat_NewInactive = 5,
SQLDMOArtStat_NewActive = 6,
SQLDMOArtStat_Max = 6
} SQLDMO_ARTSTATUS_TYPE;
typedef SQLDMO_HELPID(SQLDMO_SUBSTATUS_TYPE) enum {
SQLDMOSubStat_Unknown = 1000, // Tinyint out-of-range
SQLDMOSubStat_Default = 1000, // Use default
SQLDMOSubStat_Min = 0,
SQLDMOSubStat_Inactive = 0,
SQLDMOSubStat_Unsynced = 1,
SQLDMOSubStat_Active = 2,
SQLDMOSubStat_Max = 2
} SQLDMO_SUBSTATUS_TYPE;
typedef SQLDMO_HELPID(SQLDMO_PUBSTATUS_TYPE) enum {
SQLDMOPubStat_Unknown = 1000, // Tinyint out-of-range
SQLDMOPubStat_Default = 1000, // Use default
SQLDMOPubStat_Min = 0,
SQLDMOPubStat_Inactive = 0,
SQLDMOPubStat_Active = 1,
SQLDMOPubStat_Max = 1
} SQLDMO_PUBSTATUS_TYPE;
typedef SQLDMO_HELPID(SQLDMO_REPLICATION_TYPE) enum {
SQLDMORepType_Unknown = 0x100, // Tinyint out-of-range
SQLDMORepType_Transactional = 0x0001, // Trans replication
SQLDMORepType_Merge = 0x0002, // Merge replication
SQLDMORepType_TransactionalMerge= 0x0003, // Both forms of replication
SQLDMORepType_Default = 0x0001
} SQLDMO_REPLICATION_TYPE;
typedef SQLDMO_HELPID(SQLDMO_RESOLVECONFLICT_TYPE) enum {
SQLDMOResolveConflict_Unknown = 0x100, // Tinyint out-of-range
SQLDMOResolveConflict_Resubmit = 0x0001, // Resubmit conflict table row
SQLDMOResolveConflict_Discard = 0x0002, // Discard conflict table row
SQLDMOResolveConflict_Default = 0x0001
} SQLDMO_RESOLVECONFLICT_TYPE;
typedef SQLDMO_HELPID(SQLDMO_TRANSUBSCRIBER_TYPE) enum {
SQLDMOTranSubscriber_Unknown = 0x100, // Tinyint out-of-range
SQLDMOTranSubscriber_Min = 0,
SQLDMOTranSubscriber_ReadOnly = 0, // Trans readonly subscriber (default)
SQLDMOTranSubscriber_Synchronous = 1, // Trans synchronous subscriber
SQLDMOTranSubscriber_Queued = 2, // Trans queued subscriber
SQLDMOTranSubscriber_Failover = 3, // Trans synchronous subscriber with capability to fail over to queued subscriber
SQLDMOTranSubscriber_Default = 0,
SQLDMOTranSubscriber_Max = 3
} SQLDMO_TRANSUBSCRIBER_TYPE;
typedef SQLDMO_HELPID(SQLDMO_MERGESUBSCRIBER_TYPE) enum {
SQLDMOMergeSubscriber_Unknown = 0x100, // Tinyint out-of-range
SQLDMOMergeSubscriber_Min = 1,
SQLDMOMergeSubscriber_Global = 1, // Global Merge subscriber
SQLDMOMergeSubscriber_Local = 2, // Local Merge subscriber (default)
SQLDMOMergeSubscriber_Anonymous = 3, // Anonymous Merge subscriber
SQLDMOMergeSubscriber_Republishing = 4, // Republishing Merge subscriber
SQLDMOMergeSubscriber_Default = 2,
SQLDMOMergeSubscriber_Max = 4
} SQLDMO_MERGESUBSCRIBER_TYPE;
// bit-mask
typedef SQLDMO_HELPID(SQLDMO_REPSCRIPT_TYPE) enum {
SQLDMORepScript_Default = 0x00000100, // Default script options
SQLDMORepScript_NoSubscription = 0x00000080, // Script publication's creation without subscriptions
SQLDMORepScript_InstallDistributor = 0x00000100, // Script install of distributor
SQLDMORepScript_UninstallDistributor = 0x00000200, // Script uninstall of distributor
SQLDMORepScript_InstallPublisher = 0x00000400, // Script install of publisher
SQLDMORepScript_UninstallPublisher = 0x00000800, // Script uninstall of publisher
SQLDMORepScript_ToFileOnly = 0x00001000, // If not set, a string is returned (if file nonnull, both are done)
SQLDMORepScript_AppendToFile = 0x00002000, // Append to output file if it already exists.
SQLDMORepScript_Creation = 0x00004000, // Script the object's creation
SQLDMORepScript_Deletion = 0x00008000, // Script the object's deletion
SQLDMORepScript_PublicationCreation = 0x00010000, // Script the object's creation
SQLDMORepScript_PublicationDeletion = 0x00020000, // Script the object's deletion
SQLDMORepScript_SubscriptionCreation = 0x00040000, // obsolete
SQLDMORepScript_SubscriptionDeletion = 0x00080000, // obsolete
SQLDMORepScript_PullSubscriptionCreation= 0x00040000, // Script pull subscription creation
SQLDMORepScript_PullSubscriptionDeletion= 0x00080000, // Script pull subscription deletion
SQLDMORepScript_InstallReplication = 0x00100000, // Script install of replication
SQLDMORepScript_UninstallReplication = 0x00200000, // Script uninstall of replication
SQLDMORepScript_ReplicationJobs = 0x00400000, // Script replication related jobs
/* Output control options */
SQLDMORepScript_AnsiFile = 0x01000000, // Generate ANSI output file
SQLDMORepScript_UnicodeFile = 0x02000000, // Generate UNICODE output file
SQLDMORepScript_EnableReplicationDB = 0x04000000, // Script enabling of replication database
SQLDMORepScript_DisableReplicationDB = 0x08000000, // Script disabling of replication database
SQLDMORepScript_NoCommandTerm = 0x10000000 // Do not add command terminator
} SQLDMO_REPSCRIPT_TYPE;
// bit-mask
typedef SQLDMO_HELPID(SQLDMO_CREATIONSCRIPT_TYPE) enum {
SQLDMOCreationScript_DisableScripting = 0x00000000, // Disable the scripting of the object
SQLDMOCreationScript_PrimaryObject = 0x00000001, // Include object creation
SQLDMOCreationScript_CustomProcs = 0x00000002, // Generates custom stored procedures for the article if defined, trans only
SQLDMOCreationScript_ClusteredIndexes = 0x00000010, // Include clustered index creation (table only)
SQLDMOCreationScript_UDDTsToBaseTypes = 0x00000020, // Convert UserDefinedDatatypes to base type when creating columns (table only)
SQLDMOCreationScript_NonClusteredIndexes = 0x00000040, // Include nonclustered index creation (table only)
SQLDMOCreationScript_DRI_PrimaryKey = 0x00000080, // Include DRI on Primary keys
SQLDMOCreationScript_UserTriggers = 0x00000100, // Enable trigger scripting if set (table only)
SQLDMOCreationScript_DRI_ForeignKeys = 0x00000200, // Include foreign keys (table only)
SQLDMOCreationScript_DRI_Checks = 0x00000400, // Replicate check constraints to the subscriber (table only)
SQLDMOCreationScript_DRI_Defaults = 0x00000800, // Replicate column defaults to the subscriber (table only)
SQLDMOCreationScript_Collation = 0x00001000, // Replicate column-level collation
SQLDMOCreationScript_ExtendedProperties = 0x00002000, // Replicate extended properties
SQLDMOCreationScript_DRI_UniqueKeys = 0x00004000, // Replicate unique key
SQLDMOCreationScript_PKUKAsConstraints = 0x00008000 // Replicate primary key and unique keys as constraints instead of indexes.
} SQLDMO_CREATIONSCRIPT_TYPE;
typedef SQLDMO_HELPID(SQLDMO_COMMANDOPTION_TYPE) enum {
SQLDMOCommandOption_IncludeInsertColumnNames = 0x00000008, // Include column names in destination-table INSERT statements
SQLDMOCommandOption_BinaryParameters = 0x00000010, // Send the stored procedure parameters in binary format.
SQLDMOCommandOption_DTSHorizontalPartition = 0x00000040 // Users can set up DTS transformation servers to do horizontal partitions and take care of rows moving into or out of a partition
} SQLDMO_COMMANDOPTION_TYPE;
typedef SQLDMO_HELPID(SQLDMO_SUBSCRIPTION_TYPE) enum {
SQLDMOSubscription_Unknown = 0x100, // Tinyint out-of-range
SQLDMOSubscription_Min = 0,
SQLDMOSubscription_Push = 0x0000, // Push subscription
SQLDMOSubscription_Pull = 0x0001, // Pull subscription
SQLDMOSubscription_Anonymous = 0x0002, // Anonymous subscription
SQLDMOSubscription_All = 0x0003, // All subscriptions
SQLDMOSubscription_Default = 0x0000,
SQLDMOSubscription_Max = 3
} SQLDMO_SUBSCRIPTION_TYPE;
// bit-mask
typedef SQLDMO_HELPID(SQLDMO_PUBATTRIB_TYPE) enum {
SQLDMOPubAttrib_Unknown = 0x100, // Tinyint out-of-range
SQLDMOPubAttrib_Min = 0,
SQLDMOPubAttrib_AllowPush = 0x0001, // Allow Push
SQLDMOPubAttrib_AllowPull = 0x0002, // Allow Pull
SQLDMOPubAttrib_AllowAnonymous = 0x0004, // Anonymous PubAttrib
SQLDMOPubAttrib_InternetEnabled = 0x0008, // Internet enabled
SQLDMOPubAttrib_ImmediateSync = 0x0010, // Immediate Sync
SQLDMOPubAttrib_IndependentAgent = 0x0020, // Independent agent
SQLDMOPubAttrib_SnapshotInDefaultFolder = 0x0040, // Keep snapshot copy in default folder
SQLDMOPubAttrib_CompressSnapshot = 0x0080, // Compress snapshot files
SQLDMOPubAttrib_AllowSubscriptionCopy = 0x0100, // Allow copying subscription database and attaching to other subscribers
SQLDMOPubAttrib_Default = 0x0001,
SQLDMOPubAttrib_Valid = 0x01ff
} SQLDMO_PUBATTRIB_TYPE;
typedef SQLDMO_HELPID(SQLDMO_TASKSTATUS_TYPE) enum {
SQLDMOTask_Pending = 0,
SQLDMOTask_Starting = 1,
SQLDMOTask_Succeeded = 2,
SQLDMOTask_Running = 3,
SQLDMOTask_Idle = 4,
SQLDMOTask_Retry = 5,
SQLDMOTask_Failed = 6
} SQLDMO_TASKSTATUS_TYPE;
typedef SQLDMO_HELPID(SQLDMO_SESSION_TYPE) enum {
SQLDMOSession_Unknown
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -