public class DBCompare extends java.lang.Object implements UpgConstants
To see real time job status for DBCompare, turn on INFO logging for the DM Service (log4j.logger.maximo.service.DM).
Each comparison is tracked by a job in the DMCompJob table. For each row of data, a row is written to the DMCompResult table, with a status of MATCH, DIFFERENCE, LOCALONLY or REMOTEONLY. The attributes that are different for that row are written to the DMCompResRecord table.
The parameters for DBCompare are as follows.
Parameter ID | Parameter Value | Description |
---|---|---|
-d | Remote database driver | The database driver for the remote database. Defaults to same as local driver. |
-j | Job number | Job number |
-s | Source | DMUtil.getSourceName |
-t | Target | Remote Target Name |
-p | Package name | Package definition name. |
DMCompJob
,
DMCompResult
,
DMCompResRecord
Modifier and Type | Field and Description |
---|---|
static int |
ERROR |
static int |
INFO |
static int |
WARNING |
DB2, doNotUpdateACTION, doNotUpdateALNDOMAIN, doNotUpdateAPPLICATIONAUTH, doNotUpdateAUTOKEY, doNotUpdateCONDITION, doNotUpdateCONTRACTPROPERTY, doNotUpdateCONTRACTTYPE, doNotUpdateCROSSOVERDOMAIN, doNotUpdateDOCTYPES, doNotUpdateLANGUAGE, doNotUpdateMAXAPPS, doNotUpdateMAXCONDDETAIL, doNotUpdateMAXCONTROLVALUE, doNotUpdateMAXDOMAIN, doNotUpdateMAXLOGAPPENDER, doNotUpdateMAXLOGGER, doNotUpdateMAXMENU, doNotUpdateMAXMESSAGES, doNotUpdateMAXMODULES, doNotUpdateMAXPROP, doNotUpdateMAXPROPVALUE, doNotUpdateMAXROLE, doNotUpdateMAXSEQUENCE, doNotUpdateMAXSERSECURITY, doNotUpdateMAXSERVICE, doNotUpdateMAXTABLEDOMAIN, doNotUpdateMAXVARS, doNotUpdateMAXVARTYPE, doNotUpdateMXCOLLAB, doNotUpdateMXCOLLABREF, doNotUpdateNUMERICDOMAIN, doNotUpdateNUMRANGEDOMAIN, doNotUpdatePORTLET, doNotUpdatePRICALC, doNotUpdateSECURITYRESTRICT, doNotUpdateSIGOPTION, doNotUpdateSYNONYMDOMAIN, doNotUpdateTAXTYPE, doNotUpdateWORKPRIORITY, doNotUpdateWORKTYPE, doNotUpdateWPEDITSETTING, messageCache, NEWONLY, OLDANDNEW, OLDONLY, ORACLE, SQLINET, SQLMICROSOFT, SQLSERVER, SYSDATATABLES, SYSTEMTABLES, UNKNOWN
Constructor and Description |
---|
DBCompare(MXServer server,
UserInfo ui,
java.util.HashMap params,
java.sql.Connection con)
This constructor accepts parameter for MXServer and
sets value for
mxs . |
Modifier and Type | Method and Description |
---|---|
void |
doCompare()
Process an object.
|
void |
doConnect()
Get the package definition, target definition, etc.
|
void |
doSql(java.lang.String sql)
Execute a sql statement
|
void |
endProcess(boolean errors) |
void |
process()
Main method for DBCompare.
|
void |
readParams(java.util.HashMap params)
Process
-t parameter, set value for tbnames . |
void |
showMessage(java.lang.String e,
int level) |
void |
showMXException(MXException e,
int level) |
public static int INFO
public static int WARNING
public static int ERROR
public DBCompare(MXServer server, UserInfo ui, java.util.HashMap params, java.sql.Connection con) throws java.lang.Exception
mxs
.server
- MXServerui
- End-user's UserInfoparams
- See class javadocs for listingcon
- System user's database connectionjava.lang.Exception
readParams(java.util.HashMap)
public void process() throws java.lang.Throwable
#doCompare
to compare data
on source and target.java.lang.Throwable
doConnect()
,
doCompare()
public void doConnect() throws java.lang.Exception
java.lang.Exception
public void doCompare() throws java.lang.Throwable
java.lang.Throwable
getMetadata(java.lang.String, boolean)
,
getOrderBy(String, HashMap, HashMap)
,
getColNames(HashMap, HashMap)
,
buildSelect(java.lang.String, java.util.HashMap, java.lang.String, int)
,
compareKeys(java.sql.ResultSet, java.sql.ResultSet)
,
compareAttributes(java.sql.ResultSet, java.sql.ResultSet)
,
logSingleton(java.sql.ResultSet, boolean, java.util.HashMap<java.lang.String, java.lang.String[]>)
public void readParams(java.util.HashMap params) throws java.lang.Exception
-t
parameter, set value for tbnames
.outdir
- Not used.outfile
- Not used.params
- Parameters (see class javadocs).java.lang.Exception
public void endProcess(boolean errors) throws java.lang.Exception
java.lang.Exception
public void showMXException(MXException e, int level)
public void showMessage(java.lang.String e, int level)
public void doSql(java.lang.String sql) throws java.sql.SQLException
sql
- The Sql statementjava.sql.SQLException