The export operation is performed with data that is consistent up to the specified SCN. If the NETWORK_LINK parameter is specified, then the SCN refers to the SCN of the source database.

Follow following steps to the export database using network-link.

Source database: demo

Target database: uat

Database platform : 11.2.0.4.0

Step 1 : Create a tnsnames.ora entry with source database.

demo =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.128.101.153)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = demo)
)
)

Step 2 : Connect to target database

[oracle@localhost admin]$ export ORACLE_SID=uat
[oracle@localhost admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 15 15:52:21 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode from v$database;

NAME	  OPEN_MODE
--------- --------------------
UAT	  READ WRITE

SQL>

Step 3: Create a directory in target database server where you want to put your dump file and give read-write permission to the oracle user with which you want to take expdp backup.

SQL> create directory testdir as '/appndb/demo';

Directory created.

SQL> grant read,write on directory testdir to scott;

Grant succeeded.

SQL>

Step 4 : Create a database link with tnsnames.ora entry we mentioned earlier.

SQL> conn scott/tiger
Connected.
SQL> create database link test connect to "bank" identified by "123" using 'demo';

Database link created.

Step 5 : Take backup using expdp with netwok_link parameter

[oracle@localhost admin]$ expdp scott/tiger directory=testdir dumpfile=testt.dmp logfile=testt.log 
network_link=test

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

Anuradha’s LinkedIn: Anuradha’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.