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 


 

 

 


 

 

 
 

table_exists_action tips 

Oracle Database Tips by Donald BurlesonFebruary 15, 2015

Question:  What is the purpose of the table_exists_action parameter in the import of data pump (impdp)?  Please show an example of table_exists_action.

Answer:  Using a data pump import (impdp), there are four possible actions for table_exists_action:

TABLE_EXISTS_ACTION = {SKIP | APPEND | TRUNCATE | REPLACE}

As the name implies, table_exists_action is used in impdp when the table already exists in the database where the import is being executed.

table_exists_action=skip:  This says to ignore the data in the import file and leave the existing table untouched.  This is the default and it is not a valid argument if you set content=data_only.

table_exists_action=append:  This says to append the export data onto the existing table, leaving the existing rows and adding the new rows from the dmp file.  Of course, the number and types of the data columns must match to use the append option.  Just like the append hint, Oracle will not re-user any space on the freelists and the high-water mark for the table will be raised to accommodate the incoming rows.

table_exists_action=truncate:  This says to truncate the existing table rows, leaving the table definition and replacing the rows from the expdp dmp file being imported.  To use this option you must not have any referential integrity (constraints) on the target table.  You use the table_exists_action=truncate when the existing table columns match the import table columns.  The truncate option cannot be used over a db link or with a cluster table.

table_exists_action=replace:  This says to delete the whole table and replace both the table definition and rows from the import dmp file.  To use this option you must not have any referential integrity (constraints) on the target table.  You use the table_exists_action=replace when the existing table columns do not match the import table columns.

The default value is table_exists_action=skip, meaning that any existing tables will be left alone upon import.  If you have parent-child constraints defined, it is a best practice to disable or drop the constraints, import the data, and then re-add (or re-enable) the table constraints.  This prevents transient referential integrity errors.

Here is an example of using the impdp command-line utility:

root> impdp hr/hr tables=employees directory=mydir dumpfile=expschema.dmp table_exists_action=replace

   
Oracle Training from Don Burleson 

The best on site "Oracle training classes" are just a phone call away! You can get personalized Oracle training by Donald Burleson, right at your shop!

Oracle training
 
 


 

 

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 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster