Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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

by mediocremorsov (Initiate)
on Jan 10, 2017 at 13:24 UTC ( #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 ?

      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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2021-09-18 05:19 GMT
Find Nodes?
    Voting Booth?

    No recent polls found