--undo Table Space Summary
--View all table space names
Select name from V$tablespace;
--Create a new undo table space and set the auto-expand parameters;
Create undo tablespace undotbs2 DataFile ' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS02. DBF ' size 10m reuse autoextend on next 100m MaxSize unlimited;
-Note: In the open state, only one undo tablespace can be used at some point, and if you want to use a new tablespace, you must switch to that tablespace:
ALTER SYSTEM SET Undo_tablespace=undo2;
--Modify to manage automatically
Alter system set Undo_management=auto Scope=spfile;
Modify undo for table space management as manual
Alter system set undo_management=manual Scope=spfile;
--Modification
--Wait for the original undo table space all undo SEGMENT OFFLINE;
Select Usn,xacts,status,rssize/1024/1024/1024,hwmsize/1024/1024/1024,shrinks from V$rollstat order by Rssize;
--Delete Table space
Drop tablespace undo1 including contents and datafiles;
--Change the size of the Uodo table space
ALTER DATABASE datafile '/U2/ORADATA/SPRING/UNDOTBS01.DBF '
Resize 1024M;
Uodo is some rollback data that can be reused, and if you want to roll back data for as long as possible, you should increase the undo table space
Next lecture on temporary table space
Oracle Table Space Query maintenance command Daquan II (undo table space)