📄 sqldmo.h
字号:
SQLDMOScript_IncludeIfNotExists = 0x1000, // Include "if not exists" on object creation.
SQLDMOScript_NonClusteredIndexes = 0x2000, // Include nonclustered index creation (table and view only)
SQLDMOScript_Indexes = 0x12008, // Include all index creation (table and view only)
SQLDMOScript_Aliases = 0x4000, // For users, script aliases
SQLDMOScript_NoCommandTerm = 0x8000, // Do not append "GO" to commands.
SQLDMOScript_DRIIndexes = 0x10000, // Script DRI-generated indexes as indexes if NoDRI is specified.
SQLDMOScript_IncludeHeaders = 0x20000, // Include descriptive header in individual object script output.
SQLDMOScript_OwnerQualify = 0x40000, // Owner-qualify DROP statements (and CREATE where possible).
SQLDMOScript_TimestampToBinary = 0x80000, // Convert timestamp columns to binary(8) (for replication, etc.).
SQLDMOScript_SortedData = 0x100000, // If the index or constraint was clustered, append sorted_data
SQLDMOScript_SortedDataReorg = 0x200000, // Same as SQLDMOScript_SortedData, but Reorg is used to preserve fillfactor.
SQLDMOScript_TransferDefault = 0x670ff, // The default script type for Transfer. This is combination of following flags:
// SQLDMOScript_PrimaryObject | SQLDMOScript_Bindings | SQLDMOScript_ClusteredIndexes | SQLDMOScript_NonClusteredIndexes |
// SQLDMOScript_Triggers| SQLDMOScript_ToFileOnly|SQLDMOScript_Permissions| SQLDMOScript_IncludeHeaders|
// SQLDMOScript_Aliases|SQLDMOScript_IncludeIfNotExists|SQLDMOScript_OwnerQualify|SQLDMOScript_Drops
// DRI-restrictive flags. These may be combined with PrimaryObject as desired.
// These are to be used to include or exclude specific DRI components, such
// as for multi-pass scripting.
SQLDMOScript_DRI_NonClustered = 0x00400000,
SQLDMOScript_DRI_Clustered = 0x00800000,
SQLDMOScript_DRI_Checks = 0x01000000,
SQLDMOScript_DRI_Defaults = 0x02000000,
SQLDMOScript_DRI_UniqueKeys = 0x04000000,
SQLDMOScript_DRI_ForeignKeys = 0x08000000,
SQLDMOScript_DRI_PrimaryKey = 0x10000000,
SQLDMOScript_DRI_AllKeys = 0x1c000000, // Bitmask of all key types (PK, FK, Unique).
SQLDMOScript_DRI_AllConstraints = 0x1f000000, // Bitmask of all constraint types (PK, FK, Unique, Check, Default).
SQLDMOScript_DRI_All = 0x1fc00000, // All the foregoing (specifying this and not PrimaryObject gets just DRI output).
SQLDMOScript_DRIWithNoCheck = 0x20000000, // Script DRI with nocheck (not included in _DRI_All).
SQLDMOScript_NoIdentity = 0x40000000, // Script with no IDENTITY attribute (e.g. for Replication).
SQLDMOScript_UseQuotedIdentifiers = 0x80000000, // Scripts with quoted identifiers. Also will cause Transfer to SET QUOTED_IDENTIFIER ON on the destination.
// !!! This is a backward compatible flag, when scripting from post 6.5 server, this flag would be igored.
// !!! When scripting out from 7.0: StoreProcedure, View and Trigger carry their own QI and AnsiNulls setting
// (based on the setting when the original object was created), and this flag does not affect them anymore.
// At the end of these object scripting, they set QI to the setting according to this flag,
// and AnsiNulls to ON (ODBC default).
} SQLDMO_SCRIPT_TYPE;
typedef SQLDMO_HELPID(SQLDMO_SCRIPT2_TYPE) enum {
// Optional Script parameter.
SQLDMOScript2_Default = 0x0000, // Default
SQLDMOScript2_AnsiPadding = 0x0001, // Explicitly SET ANSI PADDING on or off before the create table
SQLDMOScript2_AnsiFile = 0x0002, // Generate ANSI output file
SQLDMOScript2_UnicodeFile = 0x0004, // Generate UNICODE output file
SQLDMOScript2_NonStop = 0x0008, // When error during script file generation, log error and continue.
// This is a special case for Convert(scptxfr70.exe), not a general purpose flag
// If client uses this flag to generate output files, they are running on their own risk
// This flag affects script out (and only the part used by Convert), it does not affect transfer in.
SQLDMOScript2_NoFG = 0x0010, // Do not generate 'ON <filegroup>'. For Replication
SQLDMOScript2_MarkTriggers = 0x0020, // Mark system triggers. For Replication single table script only.
SQLDMOScript2_OnlyUserTriggers = 0x0040, // Only script user triggers. For Replication single table script only.
SQLDMOScript2_EncryptPWD = 0x0080, // Script encrypted password for logins
SQLDMOScript2_SeparateXPs = 0x0100, // Script XP to a separate file (Convert)
SQLDMOScript2_NoWhatIfIndexes = 0x0200, // Do not script What-If indexes (default: script out)
// Following are SQLAgent related scripting flags
SQLDMOScript2_AgentNotify = 0x0400, // Script Notification for SQLAgent alert object
SQLDMOScript2_AgentAlertJob = 0x0800, // Include Job in Alert scripting
// Monarch full-text flag
SQLDMOScript2_FullTextIndex = 0x80000, // Include full-text index scripting (table only)
SQLDMOScript2_LoginSID = 0x100000, // Include the SID for standard SQLServer logins
SQLDMOScript2_FullTextCat = 0x200000, // Include full-text catelog scripting
// Extended property
SQLDMOScript2_ExtendedProperty = 0x400000, // Include extended property scripting as part of object scripting
SQLDMOScript2_NoCollation = 0x800000, // Do not script the collation clause (if source is on 7.x server).
// Default is to generate collation clause if server is on 7.x server
SQLDMOScript2_70Only = 0x1000000, // Flag to turn off the post-7.0 features, so the output is compatible to 7.0 server. Default is OFF
SQLDMOScript2_JobDisable = 0x2000000, // If specified, we would script TSQL to disable the job at the end of job creation
SQLDMOScript2_ExtendedOnly = 0x4000000, // Generate extended property only, no object creation, drop, permission, or binding would be generated.
SQLDMOScript2_DontScriptJobServer = 0x8000000 // Don't script job server for a job script
} SQLDMO_SCRIPT2_TYPE;
typedef SQLDMO_HELPID(SQLDMO_XFRSCRIPTMODE_TYPE) enum {
// How many files the XFR Script is to written to.
SQLDMOXfrFile_Default = 0x0001, // Default to summary files
SQLDMOXfrFile_SummaryFiles = 0x0001, // One files per class of objects transferred/dropped
SQLDMOXfrFile_SingleFile = 0x0002, // All scripts go to same file
SQLDMOXfrFile_SingleFilePerObject = 0x0004, // One file per object
SQLDMOXfrFile_SingleSummaryFile = 0x0008, // One file with summary file format
} SQLDMO_XFRSCRIPTMODE_TYPE;
typedef SQLDMO_HELPID(SQLDMO_DEPENDENCY_TYPE) enum {
SQLDMODep_Parents = 0, // Default: return all parents of input object
SQLDMODep_FullHierarchy = 0x10000, // Return full hierarchy; multiple rows of object and parents/children
SQLDMODep_OrderDescending = 0x20000, // Order return in descending order
SQLDMODep_Children = 0x40000, // Return children of input object
SQLDMODep_ReturnInputObject = 0x80000, // Include input object in the return set
SQLDMODep_FirstLevelOnly = 0x100000, // Return only immediate parents/children
SQLDMODep_DRIOnly = 0x200000, // Return DRI dependencies only.
SQLDMODep_IncludeSystem = 0x400000, // Include system objects
SQLDMODep_Valid = 0x7f0000 // All valid options.
} SQLDMO_DEPENDENCY_TYPE;
typedef SQLDMO_HELPID(SQLDMO_OBJSORT_TYPE) enum {
SQLDMOObjSort_Name = 0,
SQLDMOObjSort_Type = 1,
SQLDMOObjSort_Owner = 2,
SQLDMOObjSort_Date = 3
} SQLDMO_OBJSORT_TYPE;
typedef SQLDMO_HELPID(SQLDMO_SVCSTATUS_TYPE) enum {
SQLDMOSvc_Unknown = 0,
SQLDMOSvc_Running = 1,
SQLDMOSvc_Paused = 2,
SQLDMOSvc_Stopped = 3,
SQLDMOSvc_Starting = 4,
SQLDMOSvc_Stopping = 5,
SQLDMOSvc_Continuing = 6,
SQLDMOSvc_Pausing = 7
} SQLDMO_SVCSTATUS_TYPE;
typedef SQLDMO_HELPID(SQLDMO_SRVOPTION_TYPE) enum {
SQLDMOSrvOpt_Unknown = 0x0000,
SQLDMOSrvOpt_RPC = 0x0001, // For both remote and linked server, through sp_serveroption
SQLDMOSrvOpt_Publisher = 0x0002,
SQLDMOSrvOpt_Subscriber = 0x0004,
SQLDMOSrvOpt_Distributor = 0x0008,
SQLDMOSrvOpt_DistPublisher = 0x0010, // Separate from Publisher and Distributor; dpub bit set
// SQLDMOSrvOpt_ODBCDatasource = 0x0020, // Server is an ODBC datasource
// SQLDMOSrvOpt_Valid = 0x0021, // Only valid to set the RPC and ODBCDataSource options
// Following are new linked server options
SQLDMOSrvOpt_RPC_out = 0x0040, // Through sp_serveroption
SQLDMOSrvOpt_DataAccess = 0x0080, // Through sp_serveroption
SQLDMOSrvOpt_CollationCompatible = 0x0100, // Through sp_serveroption
SQLDMOSrvOpt_UseRemoteCollation = 0x0400, // Through sp_serveroption, new for 8.0 server
SQLDMOSrvOpt_LazySchemaValid = 0x0800, // Through sp_serveroption, new for 8.0 server
// Changed the following enum values to avoid conflicts between bit settings from sp_serveroption and registry settings
SQLDMOSrvOpt_NonTransacted = 0x1000, // Through registry
SQLDMOSrvOpt_InProcess = 0x2000, // Through registry
SQLDMOSrvOpt_IndexAsAccessPath = 0x4000, // Through registry
SQLDMOSrvOpt_LevelZeroOnly = 0x8000, // Through registry
SQLDMOSrvOpt_NestedQueries = 0x10000, // Through registry
SQLDMOSrvOpt_DynamicParameters = 0x20000, // Through registry
} SQLDMO_SRVOPTION_TYPE;
typedef SQLDMO_HELPID(SQLDMO_TABLEATT_TYPE) enum {
// Values from sysobjects.category.
SQLDMOTabAtt_Identity = 0x0001, // Table has an identity column
SQLDMOTabAtt_SystemObject = 0x0002, // Table is a Microsoft system-required object
SQLDMOTabAtt_ForeignKey = 0x0004, // Table has a foreign key
SQLDMOTabAtt_Referenced = 0x0008, // Table is referenced by another table's foreign key
SQLDMOTabAtt_Published = 0x0020, // Table is published
SQLDMOTabAtt_Replicated = 0x0040, // Table has an active subscriber
SQLDMOTabAtt_Check = 0x0080, // Table has a check constraint
SQLDMOTabAtt_Replica = 0x0100, // Table is actively subscribed to a publisher
SQLDMOTabAtt_PrimaryKey = 0x0200, // Table has a primary key
SQLDMOTabAtt_Unique = 0x0400, // Table has a unique constraint
SQLDMOTabAtt_Default = 0x0800, // Table has a DRI default
SQLDMOTabAtt_ReplCheck = 0x1000, // Table has a check constraint that excludes replication
SQLDMOTabAtt_HasConstraint =0x1c84 // Table has at least one DRI constraint
} SQLDMO_TABLEATT_TYPE;
typedef SQLDMO_HELPID(SQLDMO_INTSECLOGIN_TYPE) enum {
SQLDMOIntSecLogin_Unknown = 0,
SQLDMOIntSecLogin_Min = 1,
SQLDMOIntSecLogin_Admin = 1,
SQLDMOIntSecLogin_User = 2,
SQLDMOIntSecLogin_Replication = 3,
SQLDMOIntSecLogin_Max = 3
} SQLDMO_INTSECLOGIN_TYPE;
typedef SQLDMO_HELPID(SQLDMO_VERIFYCONN_TYPE) enum {
SQLDMOConn_LastState = 0x0001, // State of conn at end of last operation.
SQLDMOConn_CurrentState = 0x0002, // Actual current state (checks pipe, etc.)
SQLDMOConn_ReconnectIfDead = 0x0006, // Reconnect if we've been disconnected (0x0004 | CurrentState)..
SQLDMOConn_Valid = 0x0007 // All valid conn operations.
} SQLDMO_VERIFYCONN_TYPE;
typedef SQLDMO_HELPID(SQLDMO_EXEC_TYPE) enum {
// For ExecuteImmediate, tells how to handle multi-batch commands.
SQLDMOExec_Default = 0x0000, // None of the following
SQLDMOExec_NoCommandTerm = 0x0001, // No command-terminator parsing (i.e. don't check for "GO"; exec as single batch)
SQLDMOExec_ContinueOnError = 0x0002, // Continue batch on all but broken-connection errors.
SQLDMOExec_NoExec = 0x0004, // SET NOEXEC ON/OFF
SQLDMOExec_ParseOnly = 0x0008, // SET PARSEONLY ON/OFF
SQLDMOExec_QI_ON = 0x0010 // SET QI ON before execution, special work around for Quoted Identifier, set QI OFF before return
} SQLDMO_EXEC_TYPE;
typedef SQLDMO_HELPID(SQLDMO_CONFIGVALUE_TYPE) enum {
SQLDMOConfig_RecoveryInterval = 101,
SQLDMOConfig_AllowUpdates = 102,
SQLDMOConfig_UserConnections = 103,
SQLDMOConfig_Locks = 106,
SQLDMOConfig_OpenObjects = 107,
SQLDMOConfig_FillFactor = 109,
SQLDMOConfig_NestedTriggers = 115,
SQLDMOConfig_RemoteAccess = 117,
SQLDMOConfig_DefaultLanguage = 124,
SQLDMOConfig_LanguageInCache = 125,
SQLDMOConfig_MaxAsyncIO = 502,
SQLDMOConfig_MaxWorkerThreads = 503,
SQLDMOConfig_NetworkPacketSize = 505,
SQLDMOConfig_ShowAdvancedOption = 518,
SQLDMOConfig_RemoteProcTrans = 542,
SQLDMOConfig_RemoteConnTimeout = 543,
SQLDMOConfig_DefaultSortorderId = 1123,
SQLDMOConfig_PriorityBoost = 1517,
SQLDMOConfig_RemoteLoginTimeout = 1519,
SQLDMOConfig_RemoteQueryTimeout = 1520,
SQLDMOConfig_CursorThreshold = 1531,
SQLDMOConfig_SetWorkingSetSize = 1532,
SQLDMOConfig_UserOptions = 1534,
SQLDMOConfig_ProcessorAffinityMask = 1535,
SQLDMOConfig_MaxTextReplSize = 1536,
// New for 7.0
SQLDMOConfig_UnicodeLocalID = 1124,
SQLDMOConfig_UnicodeComparisonStyle = 1125,
SQLDMOConfig_LanguageNeutral = 1126,
SQLDMOConfig_TwoDigitYearCutoff = 1127,
SQLDMOConfig_IndexCreateMem = 1505,
SQLDMOConfig_MediaRetention = 1537,
SQLDMOConfig_CostThresholdForParallelism = 1538,
SQLDMOConfig_MaxDegreeOfParallelism = 1539,
SQLDMOConfig_MimMemoryPerQuery = 1540,
SQLDMOConfig_QueryWait = 1541,
SQLDMOConfig_VLMSize = 1542,
SQLDMOConfig_MinMemory = 1543,
SQLDMOConfig_MaxMemory = 1544,
SQLDMOConfig_QueryMaxTime = 1545,
SQLDMOConfig_LightweightPooling = 1546,
SQLDMOConfig_ScanStartup = 1547,
/** obsolete in 7.0
SQLDMOConfig_Memory = 104,
SQLDMOConfig_OpenDatabases = 105,
SQLDMOConfig_ProcedureCache = 108,
SQLDMOConfig_DatabaseSize = 111,
SQLDMOConfig_MediaRetention = 112,
SQLDMOConfig_RecoveryFlags = 113,
SQLDMOConfig_TempdbInRamMB = 501,
SQLDMOConfig_RAWorkerThreads = 508,
SQLDMOConfig_BackupThreads = 540,
SQLDMOConfig_BackupBufferSize = 541,
SQLDMOConfig_RemoteSites = 1119,
SQLDMOConfig_RASlotsPerThread = 1509,
SQLDMOConfig_RAPrefetches = 1510,
SQLDMOConfig_RADelay = 1511,
SQLDMOConfig_RACacheMissLimit = 1512,
SQLDMOConfig_RACacheHitLimit = 1513,
SQLDMOConfig_LogwriteSleepMS = 1530,
SQLDMOConfig_SortPages = 1505,
**/
/** obsolete in 8.0
SQLDMOConfig_TimeSlice = 1110,
SQLDMOConfig_SpinCounter = 1514,
SQLDMOConfig_ResourceTimeout = 1533,
**/
} SQLDMO_CONFIGVALUE_TYPE;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -