Syntax :
CREATE [SHARED] [PUBLIC] DATABASE LINK
CONNECT TO CURRENT_USER
USING '
Service name
Ex:
conn_link =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = perrito2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orabase)
)
)
EX:
CREATE DATABASE LINK conn_user USING 'conn_link';
Closing the link
Alter session close the database link
Drop the link
Drop database link
set pages 0
spool drop_gcgx_links.sql;
select 'drop database link ' || db_link || ';' from dba_db_links where owner = 'GCGX';
spool off
drop public database link TCAS_QUOTE.WORLD ;
create public database link TCAS_QUOTE.WORLD connect to tcquote identified BY quote45 using 'TCASDEV.world'
No comments:
Post a Comment