Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Expdp Impdp Network_Link Tips

Oracle Database Tips by Donald BurlesonNovember 5, 2015

Question:  How does the network_link syntax of data pump allow me to export and import between databases?

Answer:  First, note that expdp and impdp is only one of many options to migrate tables between databases.  The network_link option is great because you no longer need to have cumbersome dmp files on the server, and with network_link, the data can be transferred directly across the network, bypassing any need for a dump file. 

Also see:  direct export/imports between databases.

To use network_link you follow these simple steps:

1 - Create a TNS entry for the foreign database in your tnsnames.ora file

2 - Test with tnsping

3 - Create a database link to the foreign database

4 - Specify the database link as network_link in your expdp or impdp syntax

Using the network_link syntax, you can initiate an export job from your server and have Data Pump export data from a remote database to dump files located on the instance from which you initiate the Data Pump export job.

expdp hr/hr DIRECTORY=dpump_dir1
NETWORK_LINK=source_database_link
DUMPFILE=network_export.dmp

Oracle DBA Osama Mustafa gives this nice working example of network_link in an export/import:

With network_link you can import the schema from source database to target database. One advantage of this network_link option you don't need export and import as it does the export and import in single shot from the source to destination.

Also, the file system space is not needed to accommodate the huge dump files as we can directly import to target using network_link. The network_link is very amazing option with data pump because you can take the backup of source database schema from another database and you can store in dump files in target location as well.

Next, I added a TNS entry (File location: $ORACLE_HOME/network/admin/tnsnames.ora) for production database in my source database box. Entry as below:

production =
(description =
(address =
(protocol = tcp)
(host = xxx.xxxx.xxx.xxx)
(port = 1521)
)
(connect_data =
(server = dedicated)
(sid = production)
)
)

Note:  Make Sure you test the network connection using tnsping .

Connect to source database using sqlplus and create a database link to production database with fred user
SQL> create database link production connect to fred identified by fred using 'production';

Database link created.

SQL> select * from tab@production
2 ;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
test1 TABLE
import the fred schema of production database to source database without dumpfile(Run it From Source)
$ impdp fred/fred directory=network logfile=fred.log network_link=production


Nest
Next we will export schema from source database from target machine. You can store the dump in files. From Source Run (Copy to dump to folder network)

$ expdp fred/fred directory=network dumpfile=fred.dmp logfile=fred.log network_link=production

Note that a traditional export to a dmp file, followed by an FTP may be a faster solution if you network connection has limited bandwidth.  Also, using CTAS (create table as select) over a database link is faster than expdp, but it does not copy over the index and constraint definitions.

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster