Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-02070: database does not support in this context

Tags:

oracle

dblink

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?

like image 870
Vivek Avatar asked Jan 14 '23 14:01

Vivek


1 Answers

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

like image 195
Florin stands with Ukraine Avatar answered Jan 24 '23 09:01

Florin stands with Ukraine