Monday, 20 May 2013

How to create DBLink to Access 11i Data in Any R12 in oracle apps


step1:
get the 11i instance TNS names includes user name,password,instance name etc details.

step2:
in TNS file ,there will be HOST,PORT details.

step3:
below is the syntax.


create database link <DB Link Name> connect to <11i user name> identified by 
<<11i password>> 
 using
'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =  <host name> )(PORT = <port number>))) 
 (CONNECT_DATA = (SERVICE_NAME = <service name>)))'



example :run this below script,db will be created with name "11itoR12"

create database link  11itoR12  connect to xxxx identified by xxxx123
 using
'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = hqtsoadb9lx.xxx.com)(PORT = 1111)))
 (CONNECT_DATA = (SERVICE_NAME = 11iinstancename)))'

Note:
Now inorder to access 11i tables in Any R12,the query should be like below
i.e
select *from mtl_system_items_b@11itoR12;