{"id":101,"date":"2020-11-28T14:40:11","date_gmt":"2020-11-28T14:40:11","guid":{"rendered":"http:\/\/blog.tutschonwieder.net\/?p=101"},"modified":"2020-11-28T14:40:32","modified_gmt":"2020-11-28T14:40:32","slug":"pump-your-database-in-the-cloud","status":"publish","type":"post","link":"https:\/\/blog.tutschonwieder.net\/index.php\/2020\/11\/28\/pump-your-database-in-the-cloud\/","title":{"rendered":"Pump your database to the Cloud"},"content":{"rendered":"\n<p>Oracle Always Free ATP cloud is a nice alternative to a self-hosted XE environment.<\/p>\n\n\n\n<p>But how can I get my data inside the ATP database?<\/p>\n\n\n\n<p>DataPump can help with this task.<\/p>\n\n\n\n<p>In the first step, you have to create a Object Storage Bucket where can store your DataPump-Dumpfile. To create a new Bucket, simply click on the Quick Action &#8220;Store Data&#8221; on your Cloud dashboard or select &#8220;Object Storage&#8221; from the menu:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"424\" src=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_001-1024x424.png\" alt=\"\" class=\"wp-image-104\" srcset=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_001-1024x424.png 1024w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_001-300x124.png 300w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_001-768x318.png 768w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_001-660x273.png 660w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_001.png 1747w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>On the next page, you&#8217;ll get an overview of your storage buckets. Here you can create your new bucket via the button &#8220;Create Bucket&#8221;. Give this bucket a descriptive name and simply leave the defaults as they are. Then hit &#8220;Create Bucket&#8221;:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"647\" src=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_002-1024x647.png\" alt=\"\" class=\"wp-image-105\" srcset=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_002-1024x647.png 1024w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_002-300x190.png 300w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_002-768x485.png 768w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_002-660x417.png 660w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_002.png 1285w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After you select the bucket, you get an overview of the bucket details and also the contained files, which are &#8211; of course &#8211; none at the moment:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"492\" src=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_003-1024x492.png\" alt=\"\" class=\"wp-image-106\" srcset=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_003-1024x492.png 1024w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_003-300x144.png 300w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_003-768x369.png 768w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_003-660x317.png 660w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_003.png 1901w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The next step us uploading your Datapump Dumpfile &#8211; just press the Upload-button, select the file and wait until the upload is finished.<\/p>\n\n\n\n<p>The next step is to create a &#8220;Pre-Authentication Request&#8221;, which is a URL containing the access token to the dumpfile, so you don&#8217;t have to care about authentication.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"902\" src=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_004-1-1024x902.png\" alt=\"\" class=\"wp-image-108\" srcset=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_004-1-1024x902.png 1024w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_004-1-300x264.png 300w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_004-1-768x677.png 768w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_004-1-660x582.png 660w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_004-1.png 1270w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Upon creation of the PAR, you&#8217;ll be presented the unique link &#8211; copy it, it can only be shown once.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"285\" src=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_005-1024x285.png\" alt=\"\" class=\"wp-image-109\" srcset=\"https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_005-1024x285.png 1024w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_005-300x84.png 300w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_005-768x214.png 768w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_005-660x184.png 660w, https:\/\/blog.tutschonwieder.net\/wp-content\/uploads\/2020\/11\/Selection_005.png 1304w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The next step is to prepare your local environment for the execution of the dpimp tool, which is shown on a Linux system here.<\/p>\n\n\n\n<p>Set the environment variable <code>TNS_ADMIN<\/code> to point to the directory where you unzipped your ATP Credential-Wallet:<\/p>\n\n\n\n<p><code>export TNS_ADMIN=\/path\/to\/your_unzipped_wallet<\/code><\/p>\n\n\n\n<p>The next step is to actually run the dpimp on your local machine &#8211; to do so, please replace the string &#8220;<code>&lt;&lt;INSTANCE_NAME>><\/code>&#8221; and the string &#8220;<code>&lt;&lt;PRE-AUTHENTICATED_REQUEST_URL>><\/code>&#8221; with the PAR-Url from two steps above. If prompted, enter your <code>admin<\/code> password for your ATP instance.<\/p>\n\n\n\n<p><code>impdp admin@&lt;&lt;INSTANCE_NAME>>_high directory=data_pump_dir credential=def_cred_name   dumpfile=&lt;&lt;PRE-AUTHENTICATED_REQUEST_URL>>  parallel=8 transform=segment_attributes:n exclude=cluster,db_link,user,tablespace_quota,default_role<\/code><\/p>\n\n\n\n<p>Although the PAR-URLs are unique and quite safe, it&#8217;s a good idea to drop the Pre-Authenticated after the import is done.<\/p>\n\n\n\n<p>More detailed instructions to use DataPump in the cloud and an approach without the use of Pre-Authenticated Request-URLs can be found on <a href=\"https:\/\/fuzziebrain.com\/content\/id\/1920\/\">fuzziebrain&#8217;s blog<\/a> and on <a href=\"https:\/\/dgielis.blogspot.com\/2019\/10\/free-oracle-cloud-10-running-sqlcl-and.html\">Dimitri&#8217;s blog<\/a>.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle Always Free ATP cloud is a nice alternative to a self-hosted XE environment. But how can I get my data inside the ATP database? DataPump can help with this task. In the first step, you have to create a Object Storage Bucket where can store your DataPump-Dumpfile. To create a new Bucket, simply click [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[2,18],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/posts\/101"}],"collection":[{"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":6,"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":113,"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/posts\/101\/revisions\/113"}],"wp:attachment":[{"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tutschonwieder.net\/index.php\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}