Oracle tablespace query and maintenance command Book II (undo tablespace)

Source: Internet
Author: User

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

Related Article

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.