Home > Class Reference > %SYS namespace > %SQL.Migration.Util

%SQL.Migration.Util

class %SQL.Migration.Util extends %Library.RegisteredObject

Utilities for Sql Migration

Property Inventory

Method Inventory

Parameters

parameter RTNPREFIX = SQLImport;
Prefix for Generated Routines

Properties

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 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 PreservePKName as %Integer [ InitialExpression = 1 ];
Preserve Primary Key Constraint Name when importing table
Property methods: PreservePKNameDisplayToLogical(), PreservePKNameGet(), PreservePKNameIsValid(), PreservePKNameLogicalToDisplay(), PreservePKNameNormalize(), PreservePKNameSet()

Methods

method AccessGetPKey(hstmt As %String, TbName As %String) as %String [ Language = objectscript ]
method AddOwnerMap(SourceOwner As %String, DestOwner As %String) [ Language = objectscript ]
Add 1 Mapping of Source schema to destination schema
method ClearError() [ Language = objectscript ]
classmethod ClearErrors() [ Language = objectscript ]
Clears the Migration Error Log for this instance
method ClearOwnerMap() [ Language = objectscript ]
Deletes all the content of the OwnerMap
classmethod ClearStatusMsg() [ Language = objectscript ]
Clear the Migration status message list
method CopyOneView(VOwner As %String, VName As %String, hstmt As %String) [ Language = objectscript ]
Copy one view Definition from the remote DB to InterSystems IRIS
method CopyOneViewJ(VOwner As %String, VName As %String) [ Language = objectscript ]
Copy one view Definition from the remote DB to InterSystems IRIS
classmethod DSNClose(QHandle As %Binary) as %Status [ Language = objectscript ]
classmethod DSNExecute(ByRef QHandle As %Binary) as %Status [ Language = objectscript ]
classmethod DSNFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer) as %Status [ Language = objectscript ]
method DatatypeName(DType As %String, Precision As %Integer, Length As %Integer, Scale As %Integer, DtName As %String, %msg As %String) as %String [ Language = objectscript ]
Returns Name of InterSystems IRIS Datatype for given column
method DropForeignKeys(TbOwner As %String, TbName As %String, verbose As %Boolean = 0) as %Status [ Language = objectscript ]
Given a table, drop any foreign keys constraint defined on that table
method DropTable(TbOwner As %String, TbName As %String, verbose As %Boolean = 0) as %Status [ Language = objectscript ]
Drops one table on destination. Drops Foreign keys pointing to that table.
method DropView(VOwner As %String, VName As %String, verbose As %Boolean = 0) as %Status [ Language = objectscript ]
Drops one View on destination
classmethod ErrorLogClose(QHandle As %Binary) as %Status [ Language = objectscript ]
classmethod ErrorLogExecute(ByRef QHandle As %Binary, hdbc As %String, TbQualifier As %String, TbOwner As %String, TbName As %String, TbType As %String) as %Status [ Language = objectscript ]
classmethod ErrorLogFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer) as %Status [ Language = objectscript ]
method ExecSql(stsql As %String) as %Status [ Language = objectscript ]
Executes an Sql Statement in the current namespace as localUser
method FindIdentity(TbOwner As %String, TbName As %String, hstmt As %String) as %String [ Language = objectscript ]
Returns a $list of Columns Names which are AutoIncrement/Identity in source Database
method FindIdentityJ(TbOwner As %String, TbName As %String) as %String [ Language = objectscript ]
Returns a $list of Columns Names which are AutoIncrement/Identity in source Database
method FindViewDeps(VOwner As %String, VName As %String, hstmt As %String) as %String [ Language = objectscript ]
Get List of Dependencies for a View
method FindViewDepsJ(VOwner As %String, VName As %String) as %String [ Language = objectscript ]
classmethod GetCGateHandle() as %String [ Language = objectscript ]
Initializes before using the SqlGateWay Calls Tries to load odbcgateway and return a handle for $ZF(-5)
classmethod GetLastErrorMsg() as %String [ Language = objectscript ]
Returns last Error of Migration process
classmethod GetLastStatusMsg() as %String [ Language = objectscript ]
Returns current Status of Migration process
method GetOwnerMap(SourceOwner As %String) as %String [ Language = objectscript ]
method GetPKeyStr(hstmt As %String, TbQualifier As %String, TbOwner As %String, TbName As %String, Did As %String) as %String [ Language = objectscript ]
method GetPKeyStrJ(TbQualifier As %String, TbOwner As %String, TbName As %String, Did As %String, ByRef collist As %String) as %String [ Language = objectscript ]
method IFXFindNotNull(TbOwner As %String, TbName As %String, hstmt As %String) as %String [ Language = objectscript ]
Informix:Returns a $list of Column Names which are Not NULL is source DB
method InitDLL() as %Status [ Language = objectscript ]
classmethod LogError(FuncName As %String, errno As %Integer, errdesc As %String, TbOwner As %String, TbName As %String, sql As %String) [ Language = objectscript ]
Logs an Error into the Migration Error Log
classmethod LogStatusMsg(msg As %String) [ Language = objectscript ]
Logs Status message
method OraDefault(TbOwner As %String, TbName As %String, ColName As %String) as %String [ Language = objectscript ]
Oracle: returns Column Default from ALL_TAB_COLUMNS
classmethod ShowAllErrors() [ Language = objectscript ]
Displays all Errors for current Migration process on current device
classmethod ShowAllStatusMsg() [ Language = objectscript ]
classmethod SqlTablesClose(QHandle As %Binary) as %Status [ Language = objectscript ]
classmethod SqlTablesExecute(ByRef QHandle As %Binary, hdbc As %String, TbQualifier As %String, TbOwner As %String, TbName As %String, TbType As %String) as %Status [ Language = objectscript ]
classmethod SqlTablesFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer) as %Status [ Language = objectscript ]
method isaView(TbOwner As %String, TbName As %String, hstmt As %String) as %Integer [ Language = objectscript ]
Finds out if the given Table is a Table (0) or a View (1)
method isaViewJ(TbOwner As %String, TbName As %String) as %Integer [ Language = objectscript ]
Finds out if the given Table is a Table (0) or a View (1)

Queries

query DSN()
Selects DSNNAME As %String, DESCRIPTION As %String
query ErrorLog()
Selects OPERATION As %String, SQLCODE As %Integer, NATIVE_ERRORMSG As %String, SCHEMA_NAME As %String, TABLE_NAME As %String, DESCRIPTION As %String
query SqlTables(hdbc As %String, TbQualifier As %String, TbOwner As %String, TbName As %String, TbType As %String)
Selects CATALOG_NAME As %String, SCHEMA_NAME As %String, TABLE_NAME As %String, TABLE_TYPE As %String, REMARKS As %String
Returns results of SQLTables against remote database in hdbc

Inherited Members

Inherited Methods

Subclasses