Oracle Table Space Query maintenance command Daquan II (undo table space)

Source: Internet
Author: User

--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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.