Oracle tablespace query and maintenance command Book II (undo tablespace)
-- Undo tablespace Summary
-- View All tablespace names
Select name from v $ tablespace;
-- Create a new UNDO tablespace and set automatic expansion parameters;
Create undo tablespace undotbs2 datafile 'd: \ ORACLE \ PRODUCT \ 10.1.0 \ ORADATA \ ORCL \ UNDOTBS02.DBF 'size 10 m reuse autoextend on next 100 m maxsize unlimited;
-- Note: In the OPEN state, only one UNDO tablespace can be used at some time. To use a new tablespace, you must switch to the tablespace:
Alter system set undo_tablespace = undo2;
-- Change to automatic management
Alter system set undo_management = auto scope = spfile;
Change the tablespace Management Mode of undo to manual.
Alter system set undo_management = manual scope = spfile;
-- Modify
-- Wait for all undo segment offlines of the original UNDO tablespace;
Select usn, xacts, status, rssize/1024/1024/1024, hwmsize/1024/1024/1024, shrinks from v $ rollstat order by rssize;
-- Delete a tablespace
Drop tablespace undo1 including contents and datafiles;
-- Change the size of the uodo tablespace
Alter database datafile '/u2/oradata/spring/undotbs01.dbf'
Resize 1024 M;
Uodo is a roll-back data that can be reused. to roll back data for as long as possible, increase the undo tablespace.
Next, explain the temporary tablespace