%SQL.Migration.Util
class %SQL.Migration.Util extends %Library.RegisteredObject
Utilities for Sql MigrationProperty Inventory (Including Private)
- DBMSName
- DBMSVersion
- Debug
- DebugOutFile
- DeferIndices
- DeleteExistingData
- DriverName
- DtArray
- GTWUnicode
- MaxErrors
- NoCheck
- NoJournal
- NoTrigger
- OwnerMap
- PreservePKName
- SQLGateway
- dsn
- hdbc
- isJDBC
Method Inventory (Including Private)
- AccessGetPKey()
- AddOwnerMap()
- ClearError()
- ClearErrors()
- ClearOwnerMap()
- ClearStatusMsg()
- CopyOneView()
- CopyOneViewJ()
- DSNClose()
- DSNExecute()
- DSNFetch()
- DatatypeName()
- DropForeignKeys()
- DropTable()
- DropView()
- ErrorLogClose()
- ErrorLogExecute()
- ErrorLogFetch()
- ExecSql()
- FindIdentity()
- FindIdentityJ()
- FindViewDeps()
- FindViewDepsJ()
- GetCGateHandle()
- GetLastErrorMsg()
- GetLastStatusMsg()
- GetOwnerMap()
- GetPKeyStr()
- GetPKeyStrJ()
- IFXFindNotNull()
- InitDLL()
- LogError()
- LogStatusMsg()
- OraDefault()
- ShowAllErrors()
- ShowAllStatusMsg()
- SqlTablesClose()
- SqlTablesExecute()
- SqlTablesFetch()
- isaView()
- isaViewJ()
Parameters
parameter RTNPREFIX = SQLImport;
Prefix for Generated Routines
Properties (Including Private)
property DBMSName as %String [ Private ];
SQL_DBMSName of source DSN
Property methods: DBMSNameDisplayToLogical(), DBMSNameGet(), DBMSNameIsValid(), DBMSNameLogicalToDisplay(), DBMSNameLogicalToOdbc(), DBMSNameNormalize(), DBMSNameSet()
property DBMSVersion as %String [ Private ];
SQL_DBMSVer of source DSN
Property methods: DBMSVersionDisplayToLogical(), DBMSVersionGet(), DBMSVersionIsValid(), DBMSVersionLogicalToDisplay(), DBMSVersionLogicalToOdbc(), DBMSVersionNormalize(), DBMSVersionSet()
property Debug as %Integer [ InitialExpression = 0 ];
Debugging ?
Property methods: DebugDisplayToLogical(), DebugGet(), DebugIsValid(), DebugLogicalToDisplay(), DebugNormalize(), DebugOutFileDisplayToLogical(), DebugOutFileGet(), DebugOutFileIsValid(), DebugOutFileLogicalToDisplay(), DebugOutFileLogicalToOdbc(), DebugOutFileNormalize(), DebugOutFileSet(), DebugSet()
property DebugOutFile as %String [ InitialExpression = "Migration.sql" ];
OutputFile for Sql Statements executed (to Debug)
Property methods: DebugOutFileDisplayToLogical(), DebugOutFileGet(), DebugOutFileIsValid(), DebugOutFileLogicalToDisplay(), DebugOutFileLogicalToOdbc(), DebugOutFileNormalize(), DebugOutFileSet()
property DeferIndices as %Integer [ InitialExpression = 1 ];
If true, generate indices after importing data.
Property methods: DeferIndicesDisplayToLogical(), DeferIndicesGet(), DeferIndicesIsValid(), DeferIndicesLogicalToDisplay(), DeferIndicesNormalize(), DeferIndicesSet()
property DeleteExistingData as %Integer [ InitialExpression = 1 ];
Delete Exiting Data from table before importing
Property methods: DeleteExistingDataDisplayToLogical(), DeleteExistingDataGet(), DeleteExistingDataIsValid(), DeleteExistingDataLogicalToDisplay(), DeleteExistingDataNormalize(), DeleteExistingDataSet()
property DriverName as %String [ Private ];
SQL_DriverName ODBC Driver used to connect: used to differentiate between Oracle Native and Microsoft Driver...
Property methods: DriverNameDisplayToLogical(), DriverNameGet(), DriverNameIsValid(), DriverNameLogicalToDisplay(), DriverNameLogicalToOdbc(), DriverNameNormalize(), DriverNameSet()
property DtArray as %ArrayOfDataTypes [ Private ];
Array Of Datatypes on source Database
Property methods: DtArrayGet(), DtArrayGetObject(), DtArrayGetObjectId(), DtArrayGetSwizzled(), DtArrayIsEmpty(), DtArrayIsValid(), DtArrayNewObject(), DtArraySet(), DtArraySetObject(), DtArraySetObjectId(), DtArrayUnSwizzle()
property GTWUnicode as %String;
Does the Gateway support Wide Calls?
Property methods: GTWUnicodeDisplayToLogical(), GTWUnicodeGet(), GTWUnicodeIsValid(), GTWUnicodeLogicalToDisplay(), GTWUnicodeLogicalToOdbc(), GTWUnicodeNormalize(), GTWUnicodeSet()
property MaxErrors as %Integer [ InitialExpression = 30 ];
maximum number of Data Import Errors to report per table when Copying Data 0=All
Property methods: MaxErrorsDisplayToLogical(), MaxErrorsGet(), MaxErrorsIsValid(), MaxErrorsLogicalToDisplay(), MaxErrorsNormalize(), MaxErrorsSet()
property NoCheck as %Integer [ InitialExpression = 1 ];
If true, import will insert with %NOCHECK.
Property methods: NoCheckDisplayToLogical(), NoCheckGet(), NoCheckIsValid(), NoCheckLogicalToDisplay(), NoCheckNormalize(), NoCheckSet()
property NoJournal as %Integer [ InitialExpression = 0 ];
If true, import will run without journaling enabled.
Property methods: NoJournalDisplayToLogical(), NoJournalGet(), NoJournalIsValid(), NoJournalLogicalToDisplay(), NoJournalNormalize(), NoJournalSet()
property NoTrigger as %Integer [ InitialExpression = 0 ];
If true, import will insert with %NOTRIGGER.
Property methods: NoTriggerDisplayToLogical(), NoTriggerGet(), NoTriggerIsValid(), NoTriggerLogicalToDisplay(), NoTriggerNormalize(), NoTriggerSet()
property OwnerMap as array of %String [ Private ];
Map to translate Source DSN schemas (owner) to Cache Schemas
Property methods: OwnerMapBuildValueArray(), OwnerMapCollectionToDisplay(), OwnerMapCollectionToOdbc(), OwnerMapDisplayToCollection(), OwnerMapDisplayToLogical(), OwnerMapGet(), OwnerMapGetObject(), OwnerMapGetObjectId(), OwnerMapGetSwizzled(), OwnerMapIsValid(), OwnerMapLogicalToDisplay(), OwnerMapLogicalToOdbc(), OwnerMapNormalize(), OwnerMapOdbcToCollection(), OwnerMapSet(), OwnerMapSetObject(), OwnerMapSetObjectId()
property PreservePKName as %Integer [ InitialExpression = 1 ];
Preserve Primary Key Constraint Name when importing table
Property methods: PreservePKNameDisplayToLogical(), PreservePKNameGet(), PreservePKNameIsValid(), PreservePKNameLogicalToDisplay(), PreservePKNameNormalize(), PreservePKNameSet()
property SQLGateway as %String [ Private ];
Property for calling the GateWay with $zf(-5,..)
Property methods: SQLGatewayDisplayToLogical(), SQLGatewayGet(), SQLGatewayIsValid(), SQLGatewayLogicalToDisplay(), SQLGatewayLogicalToOdbc(), SQLGatewayNormalize(), SQLGatewaySet()
property dsn as %String [ Private ];
DSN we are connected to
Property methods: dsnDisplayToLogical(), dsnGet(), dsnIsValid(), dsnLogicalToDisplay(), dsnLogicalToOdbc(), dsnNormalize(), dsnSet()
property hdbc as %String [ Private ];
hdbc to source DSN
Property methods: hdbcDisplayToLogical(), hdbcGet(), hdbcIsValid(), hdbcLogicalToDisplay(), hdbcLogicalToOdbc(), hdbcNormalize(), hdbcSet()
property isJDBC as %Boolean [ Private , InitialExpression = 0 ];
1 if this is a JDBC connection, 0 if ODBC
Property methods: isJDBCDisplayToLogical(), isJDBCGet(), isJDBCIsValid(), isJDBCLogicalToDisplay(), isJDBCNormalize(), isJDBCSet()
Methods (Including Private)
Add 1 Mapping of Source schema to destination schema
method ClearError()
classmethod ClearErrors()
Clears the Migration Error Log for this instance
method ClearOwnerMap()
Deletes all the content of the OwnerMap
classmethod ClearStatusMsg()
Clear the Migration status message list
Copy one view Definition from the remote DB to Cache
Copy one view Definition from the remote DB to Cache
classmethod DSNFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer) as %Status
method DatatypeName(DType As %String, Precision As %Integer, Length As %Integer, Scale As %Integer, DtName As %String, %msg As %String) as %String
Returns Name of Cache Datatype for given column
Given a table, drop any foreign keys constraint defined on that table
Drops one table on destination. Drops Foreign keys pointing to that table.
Drops one View on destination
classmethod ErrorLogExecute(ByRef QHandle As %Binary, hdbc As %String, TbQualifier As %String, TbOwner As %String, TbName As %String, TbType As %String) as %Status
classmethod ErrorLogFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer) as %Status
Executes an Sql Statement in the current Cache Namespace as localUser
Returns a $list of Columns Names which are AutoIncrement/Identity in source Database
Returns a $list of Columns Names which are AutoIncrement/Identity in source Database
Get List of Dependencies for a View
classmethod GetCGateHandle() as %String
Initializes before using the SqlGateWay Calls
Tries to load cgate and return a handle for $ZF(-5)
classmethod GetLastErrorMsg() as %String
Returns last Error of Migration process
classmethod GetLastStatusMsg() as %String
Returns current Status of Migration process
method GetPKeyStr(hstmt As %String, TbQualifier As %String, TbOwner As %String, TbName As %String, Did As %String) as %String
method GetPKeyStrJ(TbQualifier As %String, TbOwner As %String, TbName As %String, Did As %String, ByRef collist As %String) as %String
Informix:Returns a $list of Column Names which are Not NULL is source DB
method InitDLL() as %Status
classmethod LogError(FuncName As %String, errno As %Integer, errdesc As %String, TbOwner As %String, TbName As %String, sql As %String)
Logs an Error into the Migration Error Log
classmethod LogStatusMsg(msg As %String)
Logs Status message
Oracle: returns Column Default from ALL_TAB_COLUMNS
classmethod ShowAllErrors()
Displays all Errors for current Migration process on current device
classmethod ShowAllStatusMsg()
classmethod SqlTablesExecute(ByRef QHandle As %Binary, hdbc As %String, TbQualifier As %String, TbOwner As %String, TbName As %String, TbType As %String) as %Status
classmethod SqlTablesFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer) as %Status
Finds out if the given Table is a Table (0) or a View (1)
Finds out if the given Table is a Table (0) or a View (1)
Queries
query DSN()
query ErrorLog()
Inherited Members
Inherited Methods (Including Private)
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %ConstructCloneInit()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnAddToSaveSet()
- %OnClose()
- %OnConstructClone()
- %OnNew()
- %OnValidateObject()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()