cancel
Showing results for 
Search instead for 
Did you mean: 

error MTK-03000 in MTK

Gold Adventurer

error MTK-03000 in MTK

hi all, i have tgr schema in EDB postgres server, and i want to load data from oracle to edb postgres with runMTK and i got the following error: 

any idea?

 

[root@rhel74cmf bin]# ./runMTK.sh -dataOnly TGR
Running EnterpriseDB Migration Toolkit (Build 51.0.1) ...
Source database connectivity info...
conn =jdbc:oracle:thin:@10.1.0.127:1521:o2pakt
user =mig
password=******
Target database connectivity info...
conn =jdbc:edb://10.1.0.130:5444/psvs_gaby2
user =user_pg
password=******
Connecting with source Oracle database server...
Connected to Oracle, version 'Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options'
Connecting with target EDB Postgres database server...

 

Connected to EnterpriseDB, version '10.4.9'
Importing redwood schema TGR...
Creating Schema...tgr
MTK-03000: General Error
java.lang.ClassCastException: class com.edb.jdbc3g.Jdbc3gStatement

One or more schema objects could not be imported during the migration process. Please review the migration output for more details.

Migration logs have been saved to /root/.enterprisedb/migration-toolkit/logs

******************** Migration Summary ********************

Total objects: 0
Successful count: 0
Failed count: 0
Invalid count: 0

*************************************************************

Tags (1)
4 REPLIES 4
EDB Team Member

Re: error MTK-03000 in MTK

Hi asotolongo,

 

Can you verify below points :

1. Do you have schema already present on the target database ? As you are using -dataOnly option, have you already executed -schema-only option earlier which executed successfully ?

2. Your schema name "TGR" is in upper case or in lower case in the database.

3.  If you can share the logs "/root/.enterprisedb/migration-toolkit/logs"  to help you with the exact issue.

 

You can refer below document for more details on mtk :

https://www.enterprisedb.com/docs/en/9.6/migrate/toc.html

Gold Adventurer

Re: error MTK-03000 in MTK

hi @chaitalirs, thanks for your response

I commented between lines

 


@chaitalirs wrote:

Hi asotolongo,

 

Can you verify below points :

1. Do you have schema already present on the target database ? As you are using -dataOnly option, have you already executed -schema-only option earlier which executed successfully ?

yes, I did it using offlinemigration with -schema-only, letter load the schema in my EDB database

 

2. Your schema name "TGR" is in upper case or in lower case in the database.

In oracle the name is TGR and in EDB es tgr

3.  If you can share the logs "/root/.enterprisedb/migration-toolkit/logs"  to help you with the exact issue.

 

2018-07-17 10:51:47 Running EnterpriseDB Migration Toolkit (Build 51.0.1) ...
2018-07-17 10:51:47 Source database connectivity info...
2018-07-17 10:51:47 conn =jdbc:oracle:thin:@10.1.0.127:1521:o2pakt
2018-07-17 10:51:47 user =mig
2018-07-17 10:51:47 password=******
2018-07-17 10:51:47 Target database connectivity info...
2018-07-17 10:51:47 conn =jdbc:edb://10.1.0.130:5444/psvs_gaby
2018-07-17 10:51:47 user =user_psvs
2018-07-17 10:51:47 password=******
2018-07-17 10:51:47 Connecting with source Oracle database server...
2018-07-17 10:52:12 Connected to Oracle, version 'Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options'
2018-07-17 10:52:12 Connecting with target EDB Postgres database server...
2018-07-17 10:52:12 Connected to EnterpriseDB, version '10.4.9'
2018-07-17 10:52:12 Warning! Character set on source Oracle is UTF8
2018-07-17 10:52:12 Warning! Character set on target EDB Postgres is LATIN1
2018-07-17 10:52:12 Importing redwood schema TGR...
2018-07-17 10:52:12 Creating Schema...tgr
2018-07-17 10:52:12 MTK-03000: General Error
java.lang.ClassCastException: class com.edb.jdbc3g.Jdbc3gStatement
2018-07-17 10:52:12 Stack Trace:
com.edb.MTKException: MTK-03000: General Error
at com.edb.MigrationToolkit.main(MigrationToolkit.java:2196)
Caused by: java.lang.ClassCastException: class com.edb.jdbc3g.Jdbc3gStatement
at java.lang.Class.asSubclass(Class.java:3404)
at com.edb.common.MTKMetaData.executeScript(MTKMetaData.java:1384)
at com.edb.MigrationToolkit.createSchema(MigrationToolkit.java:4281)
at com.edb.MigrationToolkit.importSchema(MigrationToolkit.java:4044)
at com.edb.MigrationToolkit.main(MigrationToolkit.java:2015)
2018-07-17 10:52:12
2018-07-17 10:52:12 One or more schema objects could not be imported during the migration process. Please review the migration output for more details.
2018-07-17 10:52:12
Migration logs have been saved to /root/.enterprisedb/migration-toolkit/logs
2018-07-17 10:52:12
******************** Migration Summary ********************

Total objects: 0
Successful count: 0
Failed count: 0
Invalid count: 0

*************************************************************

 

 

 

 

You can refer below document for more details on mtk :

https://www.enterprisedb.com/docs/en/9.6/migrate/toc.html


however, with -offlineMigration works correctly

other info:

java

[root@rhel74cmf ~]# java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)

 

 


OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)

Gold Adventurer

Re: error MTK-03000 in MTK

hi @chaitalirs, the problem was the driver, i change the driver and work!!!

 

 

Highlighted
EDB Team Member

Re: error MTK-03000 in MTK

Hi, asotolongo,

 

It is good to hear that the problem has been identified and fixed.

 

Kindly let us know if there is anything else we can help.

Regards,
Dhananjay