{"id":3237,"date":"2020-01-14T22:40:34","date_gmt":"2020-01-14T21:40:34","guid":{"rendered":"http:\/\/van-maanen.com\/?p=3237"},"modified":"2020-01-14T22:40:34","modified_gmt":"2020-01-14T21:40:34","slug":"copying-data-with-data-pump","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=3237","title":{"rendered":"Copying data with data pump"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Oracle has a brilliant feature to export \/ import data at great speed. The trick is to use the data pump facility. Let us first introduce the export via data pump.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We may export data via data pump as:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE stu_details_ext\nORGANIZATION EXTERNAL\n( TYPE ORACLE_DATAPUMP\nDEFAULT DIRECTORY EXTERNORA\nLOCATION ('stu_details_ext_table.dmp')\n)\nAS SELECT * FROM nationaliteit;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note that two items are created: a new table with the original details, along with a file that is stored in an external directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Subsequently, the file can be read via:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE stu_details_ext_table2\n(\"COLUMN1\" VARCHAR2(26 BYTE), \n    \"COLUMN2\" VARCHAR2(128 BYTE), \n    \"COLUMN3\" NUMBER(38,0), \n    \"COLUMN4\" NUMBER(38,0), \n    \"COLUMN5\" VARCHAR2(26 BYTE))\nORGANIZATION EXTERNAL\n(\nTYPE ORACLE_DATAPUMP\nDEFAULT DIRECTORY EXTERNORA LOCATION ('STU_DETAILS_EXT_TABLE.DMP')\n);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, the data are read from the dump file with a specification that is derived from the original table.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle has a brilliant feature to export \/ import data at great speed. The trick is to use the data pump facility. Let us first introduce the export via data pump. We may export data via data pump as: CREATE TABLE stu_details_ext ORGANIZATION EXTERNAL ( TYPE ORACLE_DATAPUMP DEFAULT DIRECTORY EXTERNORA LOCATION (&#8216;stu_details_ext_table.dmp&#8217;) ) AS SELECT [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-3237","post","type-post","status-publish","format-standard","hentry","category-nice-to-know"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3237"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3237\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3237"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}