Error in Oracle when using DBLINK

I am using jboss5.1.x, EJB3.0, JPA3.

I am trying to make a "select" request from a view that connects via dblink to another database.

Oracle 9 source database, Oracle 8 dabatase destination.

I get this error:

15:27:06,625 WARN [JDBCExceptionReporter] SQL Error: 24777, SQLState: 99999 15:27:06,625 ERROR [JDBCExceptionReporter] ORA-24777: use of non-migratable database link not allowed 

I found a solution to this error after I realized that I cannot use dblink when using XA . Therefore, I was able to solve by changing the dblink script to create a link to a shared database as follows:

  CREATE SHARED DATABASE LINK CONNECT TO IDENTIFIED BY AUTHENTICATED BY IDENTIFIED BY USING 

everything worked fine in this test environment.

Now I have moved my application to a production environment where the source database is Oracle 11 and the destination is still Oracle 8 .

The trick I used did not work this time, and I could not find a solution. This is the new exception that I get:

  Caused by: org.hibernate.exception.GenericJDBCException: could not execute query at ....Caused by: java.sql.SQLException: ORA-01012: not logged on ORA-02063: preceding line from TO_VANTIVE 

Thanks for your help,

Ray,

+6
java database oracle transactions dblink
source share
4 answers
 ORA-01012: not logged on 

it looks like you did not configure the new link correctly, and since the database now has 11g, which may have case-sensitive passwords that would be checked first.

Put quotation marks around the password in CREATE LINK if the remote scheme has case-sensitive passwords. Thus,

 CREATE SHARED DATABASE LINK CONNECT TO bob IDENTIFIED BY "MyNewPasswd1" AUTHENTICATED BY jim IDENTIFIED BY "JimsPass23" USING 'DB01'; 
+3
source share

We have the same problem with Weblogic, and the solution is to use the JABC driver without XA oracle.

+1
source share

I had the same problem with Oracle 11g (ORA-24777). I made a connection between one table (in my schema) and a view (created by a database link). I executed the entire JBoss data source in XA mode.

To make it work well, I had to change the dblink view mode . In this case, it is very important to have the exact AUTHENTICATED BY in order to avoid including "ORA-01012: not logged".

0
source share

Please make sure that the database link you are using is public and shared, if the database link is not public and shared, it will throw an ORA-24777 exception: using a link to a non-cross-database is not allowed. But if you try to run the same query directly in the database without using any Java or XA transaction, it will work fine.

0
source share

All Articles