Monday, November 4, 2013

Network_DBlink




Step:-1 Create the following tns entry in tnsnames.ora file in 1st server. (give the ip of 2nd server)
==================================================
try=
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (sid = orcl)
    )
  )

step2:- On 1st server where you have created tns entry,now create the followig DBlink in Sys schema.
====================================================================================================

create public database link remoteloc connect to scott identified by tiger using 'try';


step3:- Create directory on 1st server
=======================================================

SQL> Create or replace directory mydir as 'd:\datapump';
SQL> Grant read,write on direcotry mydir to scott;

(Also create a physical folder on drive d:\ with the name of 'datapump'


step4:- Run the expdp command on 1st server
=============================================
C:\Users\>expdp scott/tiger directory=mydir  network_link=rloc2 sche
mas=scott dumpfile=newscot1.dmp


Enjoy.........................






--

No comments: