{"id":675,"date":"2013-02-06T19:50:41","date_gmt":"2013-02-06T16:50:41","guid":{"rendered":"http:\/\/www.fatihacar.com\/blog\/?p=675"},"modified":"2015-03-12T17:44:35","modified_gmt":"2015-03-12T14:44:35","slug":"oracle-data-pump-expdp-and-impdp-in-oracle","status":"publish","type":"post","link":"http:\/\/www.fatihacar.com\/blog\/oracle-data-pump-expdp-and-impdp-in-oracle\/","title":{"rendered":"Oracle Data Pump (expdp and impdp) in Oracle"},"content":{"rendered":"<p>Oracle Data Pump is faster and more flexible alternative to the &#8220;exp&#8221; and &#8220;imp&#8221; backup system used in previous Oracle versions. impdp and expdp commands use Oracle Directory for processing of backups.<\/p>\n<p><strong>Create Directory<\/strong><\/p>\n<blockquote><p>\nCONN SYS AS SYSDBA<br \/>\nCREATE OR REPLACE DIRECTORY dirname AS &#8216;\/u01\/backup\/&#8217;;<br \/>\nGRANT READ, WRITE ON DIRECTORY dirname TO backupuser;\n<\/p><\/blockquote>\n<p><strong>Tables Export and Import<\/strong><\/p>\n<blockquote><p>\nexpdp backupuser\/password@db tables=EMPLOYEES,COUNTRY directory=dirname dumpfile=backupdumpfilename.dmp logfile=logfilenameforexp.log<\/p>\n<p>impdp backupuser\/password@db tables=EMPLOYEES,COUNTRY directory=dirname dumpfile=backupdumpfilename.dmp logfile=logfilenameforimp.log\n<\/p><\/blockquote>\n<p><strong>Schema Export and Import<\/strong><\/p>\n<blockquote><p>\nexpdp backupuser\/password@db schemas=HR directory=dirname dumpfile=backupdumpfilename.dmp logfile=logfilenameforexp.log<\/p>\n<p>impdp backupuser\/password@db schemas=HR directory=dirname dumpfile=backupdumpfilename.dmp logfile=logfilenameforimp.log\n<\/p><\/blockquote>\n<p><strong>Remap Schema<\/strong><\/p>\n<blockquote><p>\nimpdp backupuser\/password@db directory=dirname remap_schema=SourceSchema:TargetSchema dumpfile=fullbackupdumpfilename.dmp logfile=logfilenameforimp.log\n<\/p><\/blockquote>\n<p><!--more--><\/p>\n<p><strong>Table Export and Import From Full Backup With include and exclude<\/strong><\/p>\n<p>The INCLUDE and EXCLUDE parameters can be used to limit the export\/import to specific objects. When the INCLUDE parameter is used, only those objects specified by it will be included in the export\/import. When the EXCLUDE parameter is used, all objects except those specified by it will be included in the export\/import. <\/p>\n<blockquote><p>\nimpdp backupuser\/password@db schemas=HR include=TABLE:&#8221;IN (&#8216;TBL1&#8217;, &#8216;TBL2&#8217;)&#8221; directory=dirname dumpfile=backupdumpfilename.dmp logfile=logfilenameforimp.log<\/p>\n<p>impdp backupuser\/password@db schemas=HR exclude=TABLE:&#8221;= &#8216;TBL5&#8242;&#8221; directory=dirname dumpfile=backupdumpfilename.dmp logfile=logfilenameforimp.log\n<\/p><\/blockquote>\n<p><strong>Import Only One Table From Full Backup With Remap<\/strong><\/p>\n<blockquote><p>impdp backupuser\/password@db schemas=HR remap_schema=SourceSchema:TargetSchema include=TABLE:&#8221;IN (&#8216;TBL1&#8217;, &#8216;TBL2&#8217;)&#8221; directory=dirname dumpfile=backupdumpfilename.dmp logfile=logfilenameforimp.log <\/p><\/blockquote>\n<p><strong>Full Export and Import<\/strong><\/p>\n<blockquote><p>\nexpdp backupuser\/password@db full=y directory=dirname dumpfile=fullbackupdumpfilename.dmp logfile=logfilenameforexp.log<\/p>\n<p>impdp backupuser\/password@db full=y directory=dirname dumpfile=fullbackupdumpfilename.dmp logfile=logfilenameforimp.log\n<\/p><\/blockquote>\n<p>After taking a full backup, you can turn from full backup as schema by schema.<\/p>\n<blockquote><p>\nimpdp system\/password@db schemas=HR directory=dirname dumpfile=fullupdumpfilename.dmp logfile=logfilenameforimp.log\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Oracle Data Pump is faster and more flexible alternative to the &#8220;exp&#8221; and &#8220;imp&#8221; backup system used in previous Oracle versions. impdp and expdp commands use Oracle Directory for processing of backups. Create Directory CONN SYS AS SYSDBA CREATE OR REPLACE DIRECTORY dirname AS &#8216;\/u01\/backup\/&#8217;; GRANT READ, WRITE ON DIRECTORY dirname TO backupuser; Tables Export&#8230;<\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9,20],"tags":[14,90,32],"class_list":["post-675","post","type-post","status-publish","format-standard","hentry","category-administration","category-oracle-backup-and-recovery","tag-database-administration","tag-oracle","tag-oracle-administration"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p39NFI-aT","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/comments?post=675"}],"version-history":[{"count":7,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/675\/revisions"}],"predecessor-version":[{"id":1360,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/675\/revisions\/1360"}],"wp:attachment":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/media?parent=675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/categories?post=675"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/tags?post=675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}