Managing Database Links

A database link enables a one-way connection to a remote database from a local database, remember the link in only one-way. Database links can be used for the following

Privileges grant create database link to vallep;
grant create public database link to vallep;
grant drop public database link to vallep;
create private link

create database link priv_monitor connect to test01 identified by test01 using 'monitor.world';

Note: monitor is the database link name, also this is a private link so only the user who created the link can use it

create public link

create public database link pub_monitor connect to test01 identified by test01 using 'monitor.world';

Note: any user can use the link

Remove a database link drop public database link pub_monitor;
drop database link priv_monitor
Close a database link alter session close database link priv_monitor;
Display links

select * from user_db_links;
select * from all_db_links;

Useful Views
user_db_links
all_db_links
dba_db_links
Display what database links are created/available