Multitenant : Local Undo Mode in Oracle Database 12c Release 2 (12.2)
In Oracle Database 12c Release 2 each pluggable database can use its own local undo tablespace.
oracle 12cconfigurationintermediate
by OracleDba
12 views
In Oracle Database 12c Release 2 each pluggable database can use its own local undo tablespace.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
column property_name format a30
column property_value format a30
select property_name, property_value
from database_properties
where property_name = 'LOCAL_UNDO_ENABLED';
PROPERTY_NAME PROPERTY_VALUE
------------------------------ ------------------------------
LOCAL_UNDO_ENABLED TRUE
SQL>
select con_id, tablespace_name
from cdb_tablespaces
where contents = 'UNDO'
order by con_id;
CON_ID TABLESPACE_NAME
---------- ------------------------------
1 UNDOTBS1
3 UNDOTBS1
SQL>
conn / as sysdba
shutdown immediate;
startup upgrade;
alter database local undo off;
shutdown immediate;
startup;
column property_name format a30
column property_value format a30
select property_name, property_value
from database_properties
where property_name = 'LOCAL_UNDO_ENABLED';
PROPERTY_NAME PROPERTY_VALUE
------------------------------ ------------------------------
LOCAL_UNDO_ENABLED FALSE
SQL>
select con_id, tablespace_name
from cdb_tablespaces
where contents = 'UNDO'
order by con_id;
CON_ID TABLESPACE_NAME
---------- ------------------------------
1 UNDOTBS1
3 UNDOTBS1
SQL>
alter session set container = pdb1;
select file_name
from dba_data_files
where tablespace_name = 'UNDOTBS1';
----------------------------------------------------------------------------------------------------
/u02/app/oracle/oradata/cdb1/pdb1/undotbs01.dbf
SQL>
drop tablespace undotbs1;
Tablespace dropped.
SQL>12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
conn / as sysdba
column property_name format a30
column property_value format a30
select property_name, property_value
from database_properties
where property_name = 'LOCAL_UNDO_ENABLED';
PROPERTY_NAME PROPERTY_VALUE
------------------------------ ------------------------------
LOCAL_UNDO_ENABLED FALSE
SQL>
select con_id, tablespace_name
from cdb_tablespaces
where contents = 'UNDO'
order by con_id;
CON_ID TABLESPACE_NAME
---------- ------------------------------
1 UNDOTBS1
SQL>
conn / as sysdba
shutdown immediate;
startup upgrade;
alter database local undo on;
shutdown immediate;
startup;
column property_name format a30
column property_value format a30
select property_name, property_value
from database_properties
where property_name = 'LOCAL_UNDO_ENABLED';
PROPERTY_NAME PROPERTY_VALUE
------------------------------ ------------------------------
LOCAL_UNDO_ENABLED TRUE
SQL>
select con_id, tablespace_name
from cdb_tablespaces
where tablespace_name LIKE 'UNDO%'
order by con_id;
CON_ID TABLESPACE_NAME
---------- ------------------------------
1 UNDOTBS1
3 UNDO_1
SQL>
create pluggable database pdb2 admin user pdb_adm identified by Password1;
alter pluggable database pdb2 save state;
select con_id, tablespace_name
from cdb_tablespaces
where contents = 'UNDO'
order by con_id;
CON_ID TABLESPACE_NAME
---------- ------------------------------
1 UNDOTBS1
3 UNDO_1
4 UNDOTBS1
SQL>1234567
conn / as sysdba
-- Just the root container.
alter system set undo_retention=3000;
-- The root container and all PDBs.
alter system set undo_retention=3000 container=all;Please to add comments
No comments yet. Be the first to comment!