In DATABASE2 I have a database link named DBLINK which connects to DATABASE1 as a fixed user of USERDB2
In DATABASE2 I can do:
SELECT * FROM USERDB1.TABLE1@DBLINK
and everything works fine
Now I want to select from TABLE2 in DATABASE1 so basically I want to do
SELECT * FROM USERDB1.TABLE2@DBLINK
TABLE2 does exist in DATABASE1.
I have connected to DATABASE1 and granted SELECT ON TABLE2 TO USERDB2
I have verified that USERDB2 can select TABLE2 while connected to DATABASE1
However when I run the
SELECT * FROM USERDB1.TABLE2@DBLINK
I get the following error:
ORA-00942: table or view does not exist
ORA-02063: preceding line from DBLINK
00942. 00000 - "table or view does not exist"
Any help will be greatly appreciated.