Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Oracle Db Link Error ORA-01001: invalid cursor

by mediocremorsov (Initiate)
on Jan 10, 2017 at 13:24 UTC ( [id://1179305]=note: print w/replies, xml ) Need Help??


in reply to Re: Oracle Db Link Error ORA-01001: invalid cursor
in thread Oracle Db Link Error ORA-01001: invalid cursor

The innermost select query is in a loop that queries across multiple databases. And the query works for some databases and for some the prepare statement throws an error. The tablename is the same across databases For e.g
select * from customers@db_01; <-- This will execute ... ... select * from customers@db_08; <-- This one will throw a prepare fail.
I am currently investigating if the way I open my local DB connection with AutoCommit has got anything to do with this.

Replies are listed 'Best First'.
Re^3: Oracle Db Link Error ORA-01001: invalid cursor
by poj (Abbot) on Jan 10, 2017 at 18:53 UTC

    What is the relationship between id and linkname, is it 1 to 1, 1 to many or many to 1 ?

    poj
      it is 1 to many. 1 id to many dblinknames

        I would perhaps try running the first 2 queries and storing the results before running the 3rd query. As an example

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1179305]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-28 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found