{"id":1370,"date":"2018-11-26T11:38:24","date_gmt":"2018-11-26T10:38:24","guid":{"rendered":"https:\/\/dbafox.com\/?p=1370"},"modified":"2018-11-26T11:52:25","modified_gmt":"2018-11-26T10:52:25","slug":"oracle-18c-xe-flashback-pluggable-database-session","status":"publish","type":"post","link":"https:\/\/dbafox.com\/?p=1370","title":{"rendered":"Oracle &#8211; 18c XE Flashback Pluggable Database Session"},"content":{"rendered":"<h1>18c XE Flashback Pluggable Database Session<\/h1>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nSQL&gt; sho parameters reco\r\n\r\nNAME                                 TYPE        VALUE\r\n------------------------------------ ----------- ------------------------------\r\ncontrol_file_record_keep_time        integer     7\r\ndb_recovery_file_dest                string\r\ndb_recovery_file_dest_size           big integer 0\r\ndb_unrecoverable_scn_tracking        boolean     TRUE\r\nrecovery_parallelism                 integer     0\r\nremote_recovery_file_dest            string\r\nSQL&gt; host df -h\r\nFilesystem           Size  Used Avail Use% Mounted on\r\ndevtmpfs             4.8G     0  4.8G   0% \/dev\r\ntmpfs                4.8G     0  4.8G   0% \/dev\/shm\r\ntmpfs                4.8G   26M  4.8G   1% \/run\r\ntmpfs                4.8G     0  4.8G   0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/ol-root   45G   24G   21G  54% \/\r\n\/dev\/xvda1          1014M  399M  616M  40% \/boot\r\ntmpfs                974M   12K  974M   1% \/run\/user\/42\r\ntmpfs                974M     0  974M   0% \/run\/user\/0\r\ntmpfs                974M     0  974M   0% \/run\/user\/54321\r\n\r\nSQL&gt; sho parameters pfile\r\n\r\nNAME                                 TYPE        VALUE\r\n------------------------------------ ----------- ------------------------------\r\nspfile                               string      \/opt\/oracle\/product\/18c\/dbhome\r\n                                                 XE\/dbs\/spfileXE.ora\r\n\r\nSQL&gt; alter system set db_recovery_file_dest_size=20G scope=BOTH;\r\n\r\nSystem altered.\r\n\r\nSQL&gt; alter system set db_recovery_file_dest='\/opt\/oracle\/oradata\/XE\/FRA' scope=BOTH;\r\n\r\nSystem altered.\r\n\r\nSQL&gt; shutdown immediate\r\nDatabase closed.\r\nDatabase dismounted.\r\nORACLE instance shut down.\r\nSQL&gt; startup mount\r\nORACLE instance started.\r\n\r\nTotal System Global Area 1610612704 bytes\r\nFixed Size                  8896480 bytes\r\nVariable Size             520093696 bytes\r\nDatabase Buffers         1073741824 bytes\r\nRedo Buffers                7880704 bytes\r\nDatabase mounted.\r\nSQL&gt; alter database archivelog;\r\n\r\nDatabase altered.\r\n\r\nSQL&gt; alter database flashback on;\r\n\r\nDatabase altered.\r\n\r\nSQL&gt; alter database open;\r\n\r\nDatabase altered.\r\n\r\nSQL&gt; set lines 170\r\nSQL&gt; select * from v$flash_recovery_area_usage;\r\n\r\nFILE_TYPE               PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES     CON_ID\r\n----------------------- ------------------ ------------------------- --------------- ----------\r\nCONTROL FILE                             0                         0               0          0\r\nREDO LOG                                 0                         0               0          0\r\nARCHIVED LOG                             0                         0               0          0\r\nBACKUP PIECE                             0                         0               0          0\r\nIMAGE COPY                               0                         0               0          0\r\nFLASHBACK LOG                         1.95                         0               2          0\r\nFOREIGN ARCHIVED LOG                     0                         0               0          0\r\nAUXILIARY DATAFILE COPY                  0                         0               0          0\r\n\r\n8 rows selected.\r\n\r\nSQL&gt; SELECT flashback_on FROM v$database;\r\n\r\nFLASHBACK_ON\r\n------------------\r\nYES\r\n\r\nSQL&gt; select * from v$flash_recovery_area_usage;\r\n\r\nFILE_TYPE               PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES     CON_ID\r\n----------------------- ------------------ ------------------------- --------------- ----------\r\nCONTROL FILE                             0                         0               0          0\r\nREDO LOG                                 0                         0               0          0\r\nARCHIVED LOG                             0                         0               0          0\r\nBACKUP PIECE                             0                         0               0          0\r\nIMAGE COPY                               0                         0               0          0\r\nFLASHBACK LOG                         1.95                         0               2          0\r\nFOREIGN ARCHIVED LOG                     0                         0               0          0\r\nAUXILIARY DATAFILE COPY                  0                         0               0          0\r\n\r\n8 rows selected.\r\n\r\nSQL&gt; SELECT flashback_on FROM v$database;\r\n\r\nFLASHBACK_ON\r\n------------------\r\nYES\r\n\r\nSQL&gt; alter session set container=xepdb1;\r\n\r\nSession altered.\r\n\r\nSQL&gt; create restore point PDB1_GRP1 guarantee flashback database;\r\n\r\nRestore point created.\r\n\r\nSQL&gt; create table tw (id number);\r\n\r\nTable created.\r\n\r\nSQL&gt; insert into tw values(1);\r\n\r\n1 row created.\r\n\r\nSQL&gt; commit;\r\n\r\nCommit complete.\r\n\r\nSQL&gt; shutdown immediate\r\nPluggable Database closed.\r\nSQL&gt; flashback pluggable database xepdb1 to restore point PDB1_GRP1;\r\n\r\nFlashback complete.\r\n\r\nSQL&gt; show con_name\r\n\r\nCON_NAME\r\n------------------------------\r\nXEPDB1\r\n\r\nSQL&gt; startup nomount\r\n\r\n-- we are in the xepdb1 container\r\n\r\nSQL&gt; select name from v$pdbs;\r\n\r\nNAME\r\n--------------------------------------------------------\r\nXEPDB1\r\n\r\n\r\nSQL&gt; alter pluggable database open resetlogs;\r\n\r\nPluggable database altered.\r\n\r\nSQL&gt; select * from dual;\r\n\r\nD\r\n-\r\nX\r\n\r\nSQL&gt; desc tw\r\nERROR:\r\nORA-04043: object tw does not exist\r\n\r\n\r\n\r\nSQL&gt; select name from v$pdbs;\r\n\r\nNAME\r\n----------------------------------------------------------------\r\nXEPDB1\r\n\r\n\r\nSQL&gt; ALTER SESSION SET container = cdb$root;\r\n\r\nSession altered.\r\n\r\nSQL&gt; select name from v$pdbs;\r\n\r\nNAME\r\n---------------------------------------------------------------\r\nPDB$SEED\r\nXEPDB1\r\nPDB2\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>18c XE Flashback Pluggable Database Session SQL&gt; sho parameters reco NAME TYPE VALUE &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; control_file_record_keep_time integer 7 db_recovery_file_dest string db_recovery_file_dest_size big integer 0 db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 remote_recovery_file_dest string SQL&gt; host df -h Filesystem Size Used &hellip; <a href=\"https:\/\/dbafox.com\/?p=1370\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","_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":[28],"tags":[],"class_list":["post-1370","post","type-post","status-publish","format-standard","hentry","category-oracle-technical"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Oracle - 18c XE Flashback Pluggable Database Session - dbafox<\/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:\/\/dbafox.com\/?p=1370\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle - 18c XE Flashback Pluggable Database Session - dbafox\" \/>\n<meta property=\"og:description\" content=\"18c XE Flashback Pluggable Database Session SQL&gt; sho parameters reco NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 db_recovery_file_dest string db_recovery_file_dest_size big integer 0 db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 remote_recovery_file_dest string SQL&gt; host df -h Filesystem Size Used &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbafox.com\/?p=1370\" \/>\n<meta property=\"og:site_name\" content=\"dbafox\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-26T10:38:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-26T10:52:25+00:00\" \/>\n<meta name=\"author\" content=\"Ray Fox\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ray Fox\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated 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\":\"WebPage\",\"@id\":\"https:\/\/dbafox.com\/?p=1370\",\"url\":\"https:\/\/dbafox.com\/?p=1370\",\"name\":\"Oracle - 18c XE Flashback Pluggable Database Session - dbafox\",\"isPartOf\":{\"@id\":\"https:\/\/dbafox.com\/#website\"},\"datePublished\":\"2018-11-26T10:38:24+00:00\",\"dateModified\":\"2018-11-26T10:52:25+00:00\",\"author\":{\"@id\":\"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb\"},\"breadcrumb\":{\"@id\":\"https:\/\/dbafox.com\/?p=1370#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbafox.com\/?p=1370\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbafox.com\/?p=1370#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbafox.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle &#8211; 18c XE Flashback Pluggable Database Session\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbafox.com\/#website\",\"url\":\"https:\/\/dbafox.com\/\",\"name\":\"dbafox\",\"description\":\"DBA Technical Information\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbafox.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb\",\"name\":\"Ray Fox\",\"sameAs\":[\"http:\/\/www.dbafox.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Oracle - 18c XE Flashback Pluggable Database Session - dbafox","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:\/\/dbafox.com\/?p=1370","og_locale":"en_GB","og_type":"article","og_title":"Oracle - 18c XE Flashback Pluggable Database Session - dbafox","og_description":"18c XE Flashback Pluggable Database Session SQL&gt; sho parameters reco NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 db_recovery_file_dest string db_recovery_file_dest_size big integer 0 db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 remote_recovery_file_dest string SQL&gt; host df -h Filesystem Size Used &hellip; Continue reading &rarr;","og_url":"https:\/\/dbafox.com\/?p=1370","og_site_name":"dbafox","article_published_time":"2018-11-26T10:38:24+00:00","article_modified_time":"2018-11-26T10:52:25+00:00","author":"Ray Fox","twitter_misc":{"Written by":"Ray Fox","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dbafox.com\/?p=1370","url":"https:\/\/dbafox.com\/?p=1370","name":"Oracle - 18c XE Flashback Pluggable Database Session - dbafox","isPartOf":{"@id":"https:\/\/dbafox.com\/#website"},"datePublished":"2018-11-26T10:38:24+00:00","dateModified":"2018-11-26T10:52:25+00:00","author":{"@id":"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb"},"breadcrumb":{"@id":"https:\/\/dbafox.com\/?p=1370#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbafox.com\/?p=1370"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dbafox.com\/?p=1370#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbafox.com\/"},{"@type":"ListItem","position":2,"name":"Oracle &#8211; 18c XE Flashback Pluggable Database Session"}]},{"@type":"WebSite","@id":"https:\/\/dbafox.com\/#website","url":"https:\/\/dbafox.com\/","name":"dbafox","description":"DBA Technical Information","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbafox.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb","name":"Ray Fox","sameAs":["http:\/\/www.dbafox.com"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3ecMb-m6","_links":{"self":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1370"}],"version-history":[{"count":4,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1370\/revisions"}],"predecessor-version":[{"id":1374,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1370\/revisions\/1374"}],"wp:attachment":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}