oracle multi-tenant (local and shared undo tablespace)

Switch to share undo mode

This is a local undo tablespace
select property_name, property_value
from database_properties
where property_name ='LOCAL_UNDO_ENABLED';
Insert picture description here
there is a undo
tablespace select con_id, tablespace_name
from cdb_tablespaces
where contents ='UNDO';
Insert picture description here
view data files
alter session set container = pdb2;
select file_name
from dba_data_files
where tablespace_name ='UNDOTBS1';
Insert picture description here
Insert picture description here
shutdown immediate;
startup upgrade;
alter database local undo off;
shutdown immediate;
startup;
Insert picture description here
view the modified results, the
Insert picture description here
Insert picture description here
original data file and table space are still in
alter session set container = pdb2;
select file_name
from dba_data_files
where tablespace_name = 'UNDOTBS1';
Insert picture description here
Insert picture description here
Delete the table space
drop tablespace undotbs1;
Insert picture description here
Insert picture description here

Switch to local undo mode

现在是共享撤消模式
Insert picture description here
Insert picture description here
shutdown immediate;
startup upgrade;
alter database local undo on;
shutdown immediate;
startup;
Insert picture description here
select property_name, property_value
from database_properties
where property_name = ‘LOCAL_UNDO_ENABLED’;
Insert picture description here
Insert picture description here
自动生成了PDB2的UNDO表空间
alter session set container = cdb$root;
select con_id, tablespace_name
from cdb_tablespaces
where tablespace_name LIKE ‘UNDO%’
order by con_id;
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_39568073/article/details/114922252