{"id":4864,"date":"2020-12-14T10:16:39","date_gmt":"2020-12-14T13:16:39","guid":{"rendered":"https:\/\/www.dbarj.com.br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/"},"modified":"2020-12-14T10:18:36","modified_gmt":"2020-12-14T13:18:36","slug":"ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud","status":"publish","type":"post","link":"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/","title":{"rendered":"ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud"},"content":{"rendered":"<p>Those days I was trying to create a database using the &#8220;CREATE DATABASE&#8221; syntax in a IaaS Compute in Oracle Cloud to build a lab for one of my sessions.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">SQL&gt; CREATE DATABASE db21c\r\n USER SYS IDENTIFIED BY Oracle11__\r\n USER SYSTEM IDENTIFIED BY Oracle11__\r\n EXTENT MANAGEMENT LOCAL\r\n UNDO TABLESPACE undotbs1\r\n DEFAULT TEMPORARY TABLESPACE tempts1\r\n DEFAULT TABLESPACE users\r\n ENABLE PLUGGABLE DATABASE\r\n   SEED\r\n   SYSTEM DATAFILES SIZE 125M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED\r\n   SYSAUX DATAFILES SIZE 100M;\r\n\r\nCREATE DATABASE db21c\r\n*\r\nERROR at line 1:\r\nORA-00603: ORACLE server session terminated by fatal error\r\nORA-01092: ORACLE instance terminated. Disconnection forced\r\nORA-01501: CREATE DATABASE failed\r\nORA-01519: error while processing file '?\/rdbms\/admin\/dtxnspc.bsq' near line 21\r\nORA-00604: error occurred at recursive SQL level 1\r\nORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud\r\nProcess ID: 1934\r\nSession ID: 21 Serial number: 28368<\/pre>\n<p>The database somehow knew I was running under OCI and enforced the encryption of my tablespaces. I tried to create the wallet and get it working&#8230; however, I couldn&#8217;t set a Master Key as the database was not opened:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"oracledb\">SQL&gt; administer key management set key FORCE KEYSTORE identified by welcome1 with backup;\r\nadminister key management set key FORCE KEYSTORE identified by welcome1 with backup\r\n*\r\nERROR at line 1:\r\nORA-28388: database is not open in read\/write mode<\/pre>\n<p>And I end up with a <strong>ORA-28361: master key not yet set<\/strong>. So my solution was to keep the <em>encrypt_new_tablespaces=DDL<\/em> and block the OCI metadata access so my instance would bypass this enforcement:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">[root@lab21c ~]# curl 169.254.169.254\r\n&lt;html&gt;\r\n&lt;head&gt;&lt;title&gt;403 Forbidden&lt;\/title&gt;&lt;\/head&gt;\r\n&lt;body bgcolor=\"white\"&gt;\r\n&lt;center&gt;&lt;h1&gt;403 Forbidden&lt;\/h1&gt;&lt;\/center&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n[root@lab21c ~]# iptables -I OUTPUT --dst 169.254.169.254 -p tcp --dport 80 -j REJECT\r\n[root@lab21c ~]# curl 169.254.169.254\r\ncurl: (7) Failed connect to 169.254.169.254:80; Connection refused\r\n<\/pre>\n<p>Now when I retried the exact same CREATE DATABASE command, I didn&#8217;t get any error.<\/p>\n<b>Have you enjoyed? Please leave a comment or give a \ud83d\udc4d!<\/b>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style2 like-4864 jlk' href='javascript:void(0)' data-task='like' data-post_id='4864' data-nonce='de4404f630' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.dbarj.com.br\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-4864 lc'>+2<\/span><\/a><\/div><\/div> <div class='status-4864 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Those days I was trying to create a database using the &#8220;CREATE DATABASE&#8221; syntax in a IaaS Compute in Oracle Cloud to build a lab for one of my sessions. SQL&gt; CREATE DATABASE db21c USER SYS IDENTIFIED BY Oracle11__ USER SYSTEM IDENTIFIED BY Oracle11__ EXTENT MANAGEMENT LOCAL UNDO TABLESPACE undotbs1 DEFAULT TEMPORARY TABLESPACE tempts1 DEFAULT &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/\">Continue lendo<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,2],"tags":[],"class_list":["post-4864","post","type-post","status-publish","format-standard","hentry","category-oracle-cloud","category-database","item-wrap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud - DBA - Rodrigo Jorge - Oracle Tips and Guides<\/title>\n<meta name=\"description\" content=\"How to solve ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud error in OCI\" \/>\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.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"DBA RJ\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/\"},\"author\":{\"name\":\"DBA RJ\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"headline\":\"ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud\",\"datePublished\":\"2020-12-14T13:16:39+00:00\",\"dateModified\":\"2020-12-14T13:18:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/\"},\"wordCount\":138,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"articleSection\":[\"Oracle Cloud\",\"Oracle Database General\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/\",\"name\":\"ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud - DBA - Rodrigo Jorge - Oracle Tips and Guides\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/#website\"},\"datePublished\":\"2020-12-14T13:16:39+00:00\",\"dateModified\":\"2020-12-14T13:18:36+00:00\",\"description\":\"How to solve ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud error in OCI\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/2020\\\/12\\\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/#website\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/\",\"name\":\"DBA - Rodrigo Jorge - Oracle Tips and Guides\",\"description\":\"Blog about Databases, Security and High Availability\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/pt-br\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\",\"name\":\"DBA RJ\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"contentUrl\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"width\":712,\"height\":712,\"caption\":\"DBA RJ\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud - DBA - Rodrigo Jorge - Oracle Tips and Guides","description":"How to solve ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud error in OCI","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.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/","twitter_misc":{"Escrito por":"DBA RJ","Est. tempo de leitura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/#article","isPartOf":{"@id":"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/"},"author":{"name":"DBA RJ","@id":"https:\/\/www.dbarj.com.br\/pt-br\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"headline":"ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud","datePublished":"2020-12-14T13:16:39+00:00","dateModified":"2020-12-14T13:18:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/"},"wordCount":138,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbarj.com.br\/pt-br\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"articleSection":["Oracle Cloud","Oracle Database General"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/","url":"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/","name":"ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud - DBA - Rodrigo Jorge - Oracle Tips and Guides","isPartOf":{"@id":"https:\/\/www.dbarj.com.br\/pt-br\/#website"},"datePublished":"2020-12-14T13:16:39+00:00","dateModified":"2020-12-14T13:18:36+00:00","description":"How to solve ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud error in OCI","breadcrumb":{"@id":"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbarj.com.br\/pt-br\/2020\/12\/ora-28427-cannot-create-import-or-restore-unencrypted-tablespace-users-in-oracle-cloud\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbarj.com.br\/pt-br\/"},{"@type":"ListItem","position":2,"name":"ORA-28427: cannot create, import or restore unencrypted tablespace: USERS in Oracle Cloud"}]},{"@type":"WebSite","@id":"https:\/\/www.dbarj.com.br\/pt-br\/#website","url":"https:\/\/www.dbarj.com.br\/pt-br\/","name":"DBA - Rodrigo Jorge - Oracle Tips and Guides","description":"Blog about Databases, Security and High Availability","publisher":{"@id":"https:\/\/www.dbarj.com.br\/pt-br\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbarj.com.br\/pt-br\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":["Person","Organization"],"@id":"https:\/\/www.dbarj.com.br\/pt-br\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9","name":"DBA RJ","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","url":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","contentUrl":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","width":712,"height":712,"caption":"DBA RJ"},"logo":{"@id":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png"}}]}},"_links":{"self":[{"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/posts\/4864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/comments?post=4864"}],"version-history":[{"count":1,"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/posts\/4864\/revisions"}],"predecessor-version":[{"id":4865,"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/posts\/4864\/revisions\/4865"}],"wp:attachment":[{"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/media?parent=4864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/categories?post=4864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbarj.com.br\/pt-br\/wp-json\/wp\/v2\/tags?post=4864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}