http://qs321.pair.com?node_id=1179305


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