AnsweredAssumed Answered

Migrating Portgres to Oracle

Question asked by jiteshud on May 1, 2013
Latest reply on May 15, 2013 by jiteshud
Hi Everyone

I have CA APM 9.1.5.0 installed with Postgres as backend. Now I have a requirement to migrate the APM database to oracle.

I'm using the database Migration utility of CA APM.

But while running the following command:

migration.bat -srcDatabaseName cemdb -srcDatabaseType postgres -srcHost nyc16 -srcPort 5432 -srcUser admin -srcPassword quality -tgtDatabaseName orcl -tgtDatabaseType oracle -tgtHost nyc23 -tgtPort 1521 -tgtUser apmdb -tgtPassword cent3R
(Not actual values)

I'm getting the following error:

5/01/13 04:56:00 PM [INFO] {TrackerWriter} - STEP-:-1-:-VERIFY_SCHEMA_VERSION-:-START
5/01/13 04:56:00 PM [DEBUG] {ADatabaseOperations} - SQL: SELECT ts_db_versions FROM ts_domains WHERE ts_id=1
5/01/13 04:56:00 PM [DEBUG] {ADatabaseOperations} - SQL: SELECT ts_db_versions FROM ts_domains WHERE ts_id=1
5/01/13 04:56:00 PM [ERROR] {ADatabaseOperations} - SELECT ts_db_versions FROM ts_domains WHERE ts_id=1
java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist


at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)

at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)

at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)

at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)

at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)

at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)

at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:853)

at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)

at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1267)

at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1469)

at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:389)

at com.wily.apm.dbtools.migration.database.ADatabaseOperations.excuteQuery(ADatabaseOperations.java:93)

at com.wily.apm.dbtools.migration.database.DatabaseOperationsOracle.getSchemaVersion(DatabaseOperationsOracle.java:734)

at com.wily.apm.dbtools.migration.processor.MigrationController.isSchemaVersionSame(MigrationController.java:335)

at com.wily.apm.dbtools.migration.processor.MigrationController.migrate(MigrationController.java:116)

at com.wily.apm.dbtools.migration.DataMigrator.main(DataMigrator.java:29)
5/01/13 04:56:00 PM [ERROR] {DatabaseOperationsOracle} - SELECT ts_db_versions FROM ts_domains WHERE ts_id=1
java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist


at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)

at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)

at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)

at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)

at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)

at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)

at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:853)

at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)

at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1267)

at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1469)

at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:389)

at com.wily.apm.dbtools.migration.database.ADatabaseOperations.excuteQuery(ADatabaseOperations.java:93)

at com.wily.apm.dbtools.migration.database.DatabaseOperationsOracle.getSchemaVersion(DatabaseOperationsOracle.java:734)

at com.wily.apm.dbtools.migration.processor.MigrationController.isSchemaVersionSame(MigrationController.java:335)

at com.wily.apm.dbtools.migration.processor.MigrationController.migrate(MigrationController.java:116)

at com.wily.apm.dbtools.migration.DataMigrator.main(DataMigrator.java:29)
5/01/13 04:56:00 PM [ERROR] {MigrationController} - Fail to get target schema version.
5/01/13 04:56:00 PM [ERROR] {TrackerWriter} - STEP-:-1-:-VERIFY_SCHEMA_VERSION-:-FAIL
5/01/13 04:56:00 PM [INFO] {MigrationController} - Migration not completed.
----------------------------------------------------------------------------------------------------------------------------------

But when I login to Postgres admin console and run the following sql query:

SELECT ts_db_versions FROM ts_domains WHERE ts_id=1

It gives me the output as expected.


Versions:
Postgres - 8.4
Oracle - 11g

Regards,
Jitesh

Outcomes