ORA-02070: database does not support in this context

Vivek picture Vivek · Jan 4, 2013 · Viewed 20.7k times · Source

I have a query like

INSERT INTO sid_rem@dev_db
(sid)
select sid from v$session

Now, when i execute this query i get ORA-02070: database does not support in this context

This error happens only when I insert data from v$session into some remote db. Its working fine for any other table.

Anyone know why this issue and any workaround for this?

Answer

Florin Ghita picture Florin Ghita · Jan 4, 2013

Works using gv$session instead of v$session:

INSERT INTO sid_rem@dev_db(sid)
select sid from gv$session;

gv$ views are global views, that is, they are not restricted to one node(instance), but see the entire database(RAC). v$ views are subviews of gv$.

Searching on the internet I found this has something to do with distributed transactions.

Thread on ora-code.com