i have 3 read only user on 3 oracle databases db1, db2,db3 then when i log onto pl/sql on db1 with it, i can perform the query
select 1 X from dual@db2 union select 2 X from dual@db3
then i tried the jdbc code
stmt=con.createStatement();
stmt.executeQuery("select 1 X from dual@db2 union select 2 X from dual@db3");
i got ORA-16000 database open read only access error
then i tried all kinds of things like:
con.setReadOnly(true)
stmt.execute("set transaction read only");//also set transaction read/write, set transaction isolation level ...
con.setAutoCommit(true);
whatever i can think, all got the same error.
What's the difference between JDBC and oracle client used by PL/SQL? how can i get this work?