{"id":7514,"date":"2016-03-30T23:31:24","date_gmt":"2016-03-30T21:31:24","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/"},"modified":"2016-03-30T23:31:24","modified_gmt":"2016-03-30T21:31:24","slug":"cloning-a-pdb-to-the-oracle-cloud-service","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/","title":{"rendered":"Cloning a PDB to the Oracle Cloud Service"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nWhen you create a DBaaS on the Oracle Cloud Service you have only one way to access to your database: ssh with the public rsa key you provide. Then you can open some ports to access the VM. However, from the VM you can&#8217;t access your own network. You need it to move data between from on-premises or private cloud to the public cloud. Or to setup a Data Guard between them. Let&#8217;s see how to quickly tunnel your local database service through the ssh connection.<br \/>\n<!--more--><br \/>\nIn this example, I have my local database on 192.168.78.115 where service CDB is registered to listener on port 1521. I want to clone a local PDB to my public cloud CDB. Easiest is remote cloning: create a db link on destination to connect to by local CDB. I cannot create the db link using &#8216;\/\/192.168.78.115:1521&#8217; because it is not visible from the public cloud VM.<\/p>\n<p>Here is where ssh remote tunneling comes into place. I connect to my cloud VM (140.86.3.67) and forward the port 1521 from 192.168.78.115 to port 9115 on the cloud VM:<\/p>\n<pre><code>\nssh -R 9115:192.168.78.115:1521 140.86.3.67\n<\/code><\/pre>\n<p>And I can run sqlplus from there.<br \/>\nOf course, you can use a ssh config file entry for that:<\/p>\n<pre><code>\nHost cloud\n        HostName 140.86.3.67\n        RemoteForward  9115 192.168.78.115:1521\n        Port 22\n        User oracle\n        IdentityFile   ~\/.ssh\/id_rsa\n<\/code><\/pre>\n<p>That&#8217;s all. I can test the ping to local port 9115 which is forwarded to my listener on my site:<\/p>\n<pre><code>\nSQL&gt; host tnsping \/\/localhost:9115\/CDB\n&nbsp;\nTNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 30-MAR-2016 21:59:55\n&nbsp;\nCopyright (c) 1997, 2014, Oracle.  All rights reserved.\n&nbsp;\nUsed parameter files:\n\/u01\/app\/oracle\/product\/12.1.0\/dbhome_1\/network\/admin\/sqlnet.ora\n&nbsp;\nUsed EZCONNECT adapter to resolve the alias\nAttempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=CDB))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=9115)))\nOK (140 msec)\n<\/code><\/pre>\n<p>Then create a database link to it:<\/p>\n<pre><code>\nSQL&gt; create database link LOCALHOST9115CDB connect to system identified by oracle using '\/\/localhost:9115\/CDB';\nDatabase link created.\n<\/code><\/pre>\n<p>and run my PDB clone through it:<\/p>\n<pre><code>\nSQL&gt; create pluggable database PDB from PDB@LOCALHOST9115CDB;\nPluggable database created.\n<\/code><\/pre>\n<p>You can use that for duplicate from active as well. In 12c you will probably use pull based duplicates, especially when transferring to the cloud because backupsets are smaller and may be compressed, so you will need a connection from the auxiliary to the target. Then you will need the remote port forwarding. If you prefer to Data Pump and don&#8217;t bother with scp, it&#8217;s the same: you can export or import through database link. For a standby configuration (Data Guard or Dbvisit Standby) you can do the same as long as the ssh connection is permanent. Better to setup a VPN for that.<\/p>\n<p>I really encourage you to test the Cloud and Multitenant. There is a free trial easy to setup: <a href=\"https:\/\/cloud.oracle.com\/home#platform\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/cloud.oracle.com\/home#platform<\/a><br \/>\nMove one of your database to it and see how it looks like: Agility, Performance, Availability.<br \/>\nIf you&#8217;re around, there is the SITB in Geneva in few weeks: <a href=\"http:\/\/www.salon-sitb.ch\/exposants\/fiche\/686\/dbi-services.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.salon-sitb.ch\/exposants\/fiche\/686\/dbi-services.html<\/a><br \/>\nI&#8217;ll be there are the Oracle \/ dbi services booth. Let&#8217;s talk about Cloud, Multitenant, or anything else.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . When you create a DBaaS on the Oracle Cloud Service you have only one way to access to your database: ssh with the public rsa key you provide. Then you can open some ports to access the VM. However, from the VM you can&#8217;t access your own network. You need it [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[220,135,221,64,96,66,223],"type_dbi":[],"class_list":["post-7514","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-cdb","tag-cloud","tag-data-guard","tag-multitenant","tag-oracle","tag-pdb","tag-pluggable-databases"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Cloning a PDB to the Oracle Cloud Service - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cloning a PDB to the Oracle Cloud Service\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . When you create a DBaaS on the Oracle Cloud Service you have only one way to access to your database: ssh with the public rsa key you provide. Then you can open some ports to access the VM. However, from the VM you can&#8217;t access your own network. You need it [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-30T21:31:24+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Cloning a PDB to the Oracle Cloud Service\",\"datePublished\":\"2016-03-30T21:31:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/\"},\"wordCount\":427,\"commentCount\":0,\"keywords\":[\"CDB\",\"Cloud\",\"Data Guard\",\"multitenant\",\"Oracle\",\"PDB\",\"Pluggable Databases\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/\",\"name\":\"Cloning a PDB to the Oracle Cloud Service - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2016-03-30T21:31:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cloning a PDB to the Oracle Cloud Service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Cloning a PDB to the Oracle Cloud Service - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/","og_locale":"en_US","og_type":"article","og_title":"Cloning a PDB to the Oracle Cloud Service","og_description":"By Franck Pachot . When you create a DBaaS on the Oracle Cloud Service you have only one way to access to your database: ssh with the public rsa key you provide. Then you can open some ports to access the VM. However, from the VM you can&#8217;t access your own network. You need it [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/","og_site_name":"dbi Blog","article_published_time":"2016-03-30T21:31:24+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Cloning a PDB to the Oracle Cloud Service","datePublished":"2016-03-30T21:31:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/"},"wordCount":427,"commentCount":0,"keywords":["CDB","Cloud","Data Guard","multitenant","Oracle","PDB","Pluggable Databases"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/","url":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/","name":"Cloning a PDB to the Oracle Cloud Service - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2016-03-30T21:31:24+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/cloning-a-pdb-to-the-oracle-cloud-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Cloning a PDB to the Oracle Cloud Service"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/7514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=7514"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/7514\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=7514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=7514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=7514"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=7514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}