Create drop database link in another schema Oracle

Unfortunately in Oracle you can’t create or drop database link in another schema. It’s very frustrating. Simple solution is to create anonymous block which will first create dummy function in another schema and then reuse it to create or drop an object(in our case database link).

Of course it can be reused to do other types of object as well.

Continue reading

ORA-22992, ORA-64202 cannot use LOB locators selected from remote tables

If you want try to select CLOB column via database link then you get error ORA-22992

select * from <TABLE_NAME>@<DATABASE LINK>;

ORA-22992: cannot use LOB locators selected from remote tables
22992. 00000 -  "cannot use LOB locators selected from remote tables"
*Cause:    A remote LOB column cannot be referenced.
*Action:   Remove references to LOBs in remote tables.

This article shows how to avoid this error

Continue reading