psdi.dm.util

Class DBCompare

  • java.lang.Object
    • psdi.dm.util.DBCompare
  • All Implemented Interfaces:
    UpgConstants


    public class DBCompare
    extends java.lang.Object
    implements UpgConstants
    Database Comparison utility, to compare data in two databases. The "local" database is the database where MXServer is running and the user is logged in. The "remote" or "target" database is the other database being compared.

    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 IDParameter ValueDescription
    -dRemote database driverThe database driver for the remote database. Defaults to same as local driver.
    -jJob numberJob number
    -sSourceDMUtil.getSourceName
    -tTargetRemote Target Name
    -pPackage namePackage definition name.
    See Also:
    DMCompJob, DMCompResult, DMCompResRecord
    • Field Detail

      • INFO

        public static int INFO
      • WARNING

        public static int WARNING
      • ERROR

        public static int ERROR
      • objName

        protected java.lang.String objName
      • colsLocal

        protected java.util.HashMap colsLocal
      • colsRemote

        protected java.util.HashMap colsRemote
      • localOnly

        protected java.util.HashMap localOnly
      • remoteOnly

        protected java.util.HashMap remoteOnly
      • entityname

        protected java.lang.String entityname
      • isView

        protected int isView
      • uniqueColName

        protected java.lang.String uniqueColName
      • orderBySql

        protected java.lang.String orderBySql
      • orderByInfo

        protected java.util.HashMap orderByInfo
    • Constructor Detail

      • DBCompare

        public DBCompare(MXServer server,
                         UserInfo ui,
                         java.util.HashMap params,
                         java.sql.Connection con)
                  throws java.lang.Exception
        This constructor accepts parameter for MXServer and sets value for mxs.
        Parameters:
        server - MXServer
        ui - End-user's UserInfo
        params - See class javadocs for listing
        con - System user's database connection
        Throws:
        java.lang.Exception
        See Also:
        DBCompare.readParams(java.util.HashMap)