smitrp
smitrp

Reputation: 1312

Migration from Oracle to MySql

I want to migrate from oracle to MySql. I am using MySql Migration tools 5.0. Something went wrong in Migration wizard.

Error while establishing connection

Error message is

Connecting to source database and retrieve schemata names.
Initializing JDBC driver ... 
Driver class Oracle Thin JDBC Driver using Service
Opening connection ... 
Connection jdbc:oracle:thin:system/**********@//127.0.0.1:1521/OracleServiceXE
The list of schema names could not be retrieved (error: 0).
ReverseEngineeringOracle.getSchemata :Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was:
//127.0.0.1:1521/OracleServiceXE

Details: 
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:280)
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringGeneric.establishConnection(ReverseEngineeringGeneric.java:141)
com.mysql.grt.modules.ReverseEngineeringOracle.getSchemata(ReverseEngineeringOracle.java:43)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.mysql.grt.Grt.callModuleFunction(Unknown Source)

Both SQL servers are running on localhost.

How can I solve these errors ?

Upvotes: 1

Views: 1495

Answers (2)

user123664
user123664

Reputation:

You can add the used service name to the oracle database, or modify the entered value 'OracleServiceXE' to the correct value 'XE'. The entered value looks a lot like the default windows service name and could be confused with the Oracle database service name.

To change the current instance service name to OracleServiceXE:

alter system set service_name = 'OracleServiceXE';

lsnrctl services

should also show the service name after wards, unless the database instance is in restricted state, in that case the connection using a service name will fail.

Upvotes: 2

Lukas Eder
Lukas Eder

Reputation: 221275

It looks to me that your jdbc connection URL for Oracle is wrong. Typically it looks something like this:

jdbc:oracle:thin:@localhost:1521:xe

What happens if you remove the double slashes // and replace the slash / between 1521/OracleServiceXE by a colon : ?

Upvotes: 0

Related Questions