How to Take Data Pump Backup Using Network Link


In this article we have a discussion how to take oracle database backup using data pump through network link.  Oracle Data Pump technology enables very high-speed movement of data and metadata from one database to another. Oracle Data Pump is available only on Oracle Database 10g release 1 (10.1) and later. 

Oracle data pump export support a network mode in which job's is remote oracle instance. Here we are going to show data pump export through network link where source and destination are different server. 

Let's source database server IP address (192.168.105.3) and destination server IP address (192.168.105.4)

# Destination server (192.168.105.4) activities

==================================

1. Create user and grant full export permission

create user dpback identified by dpback;

grant create session,connect,resource to dpback;

grant EXP_FULL_DATABASE to dpback;

grant dba to dpback;

2. Create public link in destination server using source database user 

create public database link source connect to dpback identified by dpback using 192.168.105.3:1521/TESTDB';

3. Create physical backup directory and grant permission

create or replace directory db_rback as '/u01/backup';

grant read,write on directory db_rback to dpback;

# Source server (192.168.105.3) Activities
===================================
1. Create a backup user and grant full export permission to user
create user dpback identified by dpback;
grant create session,connect,resource to dpback;
grant EXP_FULL_DATABASE to dpback;

# Full database backup export script run in destination server (192.168.105.4)
expdp dpback/dpback full=y network_link=SOURCE directory=db_rback  dumpfile=Fulldb_Export_08022021.dmp logfile= Fulldb_Export_08022021.log

Note: Here expdb command user destination server user and password
# For Table export following script run in destination server (192.168.105.4)
expdp dpback/dpback tables=TBTEST network_link=SOURCE directory=db_rback  dumpfile=TBTEST_Export_08022021.dmp logfile= TBTEST_Export_08022021.log

# Export schema script as follow
expdp dpback/dpback SCHEMAS=TESTSCHEMA network_link=SOURCE directory=db_rback  dumpfile=TEST_Schema_Export_08022021.dmp logfile= TEST_Schema_Export_08022021.log

Done!

Post a Comment

0 Comments

3