Package solutions.a2.cdc.oracle
Class OraRdbmsInfo
java.lang.Object
solutions.a2.cdc.oracle.OraRdbmsInfo
OraRdbmsInfo: Various Oracle Database routines
- Author:
- Aleksei Veremeev
-
Constructor Summary
ConstructorsConstructorDescriptionOraRdbmsInfo(Connection connection) OraRdbmsInfo(Connection connection, boolean includeSchema) -
Method Summary
Modifier and TypeMethodDescriptionlongfirstScnFromArchivedLogs(Connection connection) Returns first available SCN from V$ARCHIVED_LOGgenerateRacJdbcUrls(String url, List<String> instances) Returns list of JDBC URLs for connecting to every RAC instance specified in instances listgetConUidsList(Connection connection) intlonggetDbId()shortgetInstances(oracle.jdbc.OracleConnection connection) getMineObjectsIds(Connection connection, boolean exclude, String where) Returns part of WHERE with OBJECT_ID's to exclude or includegetPkColumnsFromDict(Connection connection, short conId, String owner, String tableName) Returns set of column names for primary key or it equivalent (unique with all non-null)intorg.apache.kafka.connect.data.SchemagetStandbyThreads(oracle.jdbc.OracleConnection connection) Returns list of threads in physical standbyorg.apache.kafka.connect.data.StructgetStruct(String query, String pdbName, String owner, String table, long scn, long ts, String xid, long commitScn, String rowId) intintbooleanisCdb()booleanbooleanbooleanbooleanvoidsetRedoThread(int redoThread) static booleansupplementalLoggingSet(Connection connection, short conId, String owner, String tableName) toString()
-
Constructor Details
-
OraRdbmsInfo
- Throws:
SQLException
-
OraRdbmsInfo
- Throws:
SQLException
-
-
Method Details
-
getStruct
-
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 Databaseowner- - Table ownertableName- - Table name- Returns:
- - Set with names of primary key columns. null if nothing found
- Throws:
SQLException
-
generateRacJdbcUrls
Returns list of JDBC URLs for connecting to every RAC instance specified in instances list- Parameters:
url- initial connection URLinstances- 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
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 databaseexclude-where-- Returns:
- Throws:
SQLException
-
getConUidsList
- Throws:
SQLException
-
getVersionString
-
getRdbmsEdition
-
getVersionMajor
public int getVersionMajor() -
getVersionMinor
public int getVersionMinor() -
getInstanceNumber
public short getInstanceNumber() -
getInstanceName
-
getHostName
-
getCpuCoreCount
public int getCpuCoreCount() -
getDbId
public long getDbId() -
getDatabaseName
-
getPlatformName
-
isCdb
public boolean isCdb() -
isCdbRoot
public boolean isCdbRoot() -
isPdbConnectionAllowed
public boolean isPdbConnectionAllowed() -
getPdbName
-
getSchema
public org.apache.kafka.connect.data.Schema getSchema() -
getDbCharset
-
getDbNCharCharset
-
getDbUniqueName
-
getRedoThread
public int getRedoThread() -
setRedoThread
public void setRedoThread(int redoThread) -
getSupplementalLogDataAll
-
getSupplementalLogDataMin
-
isCheckSupplementalLogData4Table
public boolean isCheckSupplementalLogData4Table() -
isWindows
public boolean isWindows() -
toString
-