Create DB LINK
step 1:
connect as system user
select * from dba_db_links;
step 2:
I am getting already created db link named below.
PUBLIC APPS.CHEMFABNT.COM APPS (DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = caltest.chemfabnt.com)(PORT = 1562))(CONNECT_DATA = (SERVICE_NAME = TEST))) 01-DEC-16 12.40.39
DROP PUBLIC DATABASE LINK APPS;
step 3:
suppose i need to use existing db link or create new dblink
step 4:
now i am going to drop existing db link created by system user (db link name is PUBLIC)
DROP PUBLIC DATABASE LINK APPS;
step 5:
to create new db link (as a system user)
CREATE PUBLIC DATABASE LINK APPS connect to apps identified by cloneapps USING '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = caltest.chemfabnt.com)(PORT = 1562))(CONNECT_DATA = (SERVICE_NAME = TEST)))';
step 6:
to create new db link ( as a another user)
APPS (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=prodebs.chemfabnt.com)(PORT=1522)) (CONNECT_DATA= (SERVICE_NAME=PROD) (INSTANCE_NAME=PROD))) 22-JUN-16 10.27.51
------------------------------------------------------------------------
select db_link from USER_DB_LINKS;
create database link XXCAL connect to apps identified by cloneapps USING '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = caltest.chemfabnt.com)(PORT = 1562))(CONNECT_DATA = (SERVICE_NAME = TEST)))';
select CREATED,LOG_MODE,OPEN_MODE,ARCHIVELOG_CHANGE# from v$database@APPS;
desc V$database;
No comments:
Post a Comment