Class OraRdbmsInfo

java.lang.Object
solutions.a2.cdc.oracle.OraRdbmsInfo

public class OraRdbmsInfo extends Object
OraRdbmsInfo: Various Oracle Database routines
Author:
Aleksei Veremeev
  • Constructor Details

  • Method Details

    • getStruct

      public org.apache.kafka.connect.data.Struct getStruct(String query, String pdbName, String owner, String table, long scn, long ts, String xid, long commitScn, String rowId)
    • supplementalLoggingSet

      public static boolean supplementalLoggingSet(Connection connection, short conId, String owner, String tableName) throws SQLException
      Throws:
      SQLException
    • getPkColumnsFromDict

      public static Set<String> getPkColumnsFromDict(Connection connection, short conId, String owner, String tableName) throws SQLException
      Returns set of column names for primary key or it equivalent (unique with all non-null)
      Parameters:
      connection - - Connection to data dictionary (db in 'OPEN' state)
      conId - - CON_ID, if -1 we working with non CDB or pre-12c Oracle Database
      owner - - Table owner
      tableName - - Table name
      Returns:
      - Set with names of primary key columns. null if nothing found
      Throws:
      SQLException
    • generateRacJdbcUrls

      public static List<String> generateRacJdbcUrls(String url, List<String> instances)
      Returns list of JDBC URLs for connecting to every RAC instance specified in instances list
      Parameters:
      url - initial connection URL
      instances - list of available instances in RAC
      Returns:
      list of JDBC URLs
    • getInstances

      public static List<String> getInstances(oracle.jdbc.OracleConnection connection) throws SQLException
      Throws:
      SQLException
    • getStandbyThreads

      public static List<String> getStandbyThreads(oracle.jdbc.OracleConnection connection) throws SQLException
      Returns list of threads in physical standby
      Parameters:
      connection - connection to database
      Returns:
      list of threads
      Throws:
      SQLException
    • firstScnFromArchivedLogs

      public long firstScnFromArchivedLogs(Connection connection) throws SQLException
      Returns first available SCN from V$ARCHIVED_LOG
      Parameters:
      connection - - Connection to mining database
      Returns:
      - first available SCN
      Throws:
      SQLException
    • getMineObjectsIds

      public String getMineObjectsIds(Connection connection, boolean exclude, String where) throws SQLException
      Returns part of WHERE with OBJECT_ID's to exclude or include
      Parameters:
      connection - - Connection to dictionary database
      exclude -
      where -
      Returns:
      Throws:
      SQLException
    • getConUidsList

      public String getConUidsList(Connection connection) throws SQLException
      Throws:
      SQLException
    • getVersionString

      public String getVersionString()
    • getRdbmsEdition

      public String getRdbmsEdition()
    • getVersionMajor

      public int getVersionMajor()
    • getVersionMinor

      public int getVersionMinor()
    • getInstanceNumber

      public short getInstanceNumber()
    • getInstanceName

      public String getInstanceName()
    • getHostName

      public String getHostName()
    • getCpuCoreCount

      public int getCpuCoreCount()
    • getDbId

      public long getDbId()
    • getDatabaseName

      public String getDatabaseName()
    • getPlatformName

      public String getPlatformName()
    • isCdb

      public boolean isCdb()
    • isCdbRoot

      public boolean isCdbRoot()
    • isPdbConnectionAllowed

      public boolean isPdbConnectionAllowed()
    • getPdbName

      public String getPdbName()
    • getSchema

      public org.apache.kafka.connect.data.Schema getSchema()
    • getDbCharset

      public String getDbCharset()
    • getDbNCharCharset

      public String getDbNCharCharset()
    • getDbUniqueName

      public String getDbUniqueName()
    • getRedoThread

      public int getRedoThread()
    • setRedoThread

      public void setRedoThread(int redoThread)
    • getSupplementalLogDataAll

      public String getSupplementalLogDataAll()
    • getSupplementalLogDataMin

      public String getSupplementalLogDataMin()
    • isCheckSupplementalLogData4Table

      public boolean isCheckSupplementalLogData4Table()
    • isWindows

      public boolean isWindows()
    • toString

      public String toString()
      Overrides:
      toString in class Object