Online expansion of database UNDO tablespace

Source: Internet
Author: User

Online expansion of database UNDO tablespace

Expand the database UNDO tablespace online and log on to the Oracle database server with an Oracle account

Method 1:

View the tablespace name and file location:

Select tablespace_name, file_id, file_name, round (bytes/(1024*1024), 0) total_space

From dba_data_files order by tablespace_name;

Modify the data file size of the database to the new size.

Alter database datafile '\ oracle \ oradata \ undotab1.dbf' resize 4000 m;

Method 2:

Start SQL * Plus session and execute the following command:

Oracle % sqlplus/nolog
SQL> connect/as sysdba;
SQL> spool $ ORACLE_BASE/admin/oss/scripts/recreate_undo.log;
SQL> CREATE SMALLFILE UNDO TABLESPACE "UNDOTBS2" DATAFILE '/db/data/undotbs02.dbf' SIZE 30 M REUSE AUTOEXTEND ON NEXT 5120 K MAXSIZE 32767 M;
SQL> ALTER SYSTEM SET UNDO_TABLESPACE = "UNDOTBS2 ";
SQL> DROP TABLESPACE UNDOTBS1 INCLUDING CONTENTS AND DATAFILES;
SQL> CREATE BIGFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/db/data/undotbs01.dbf' SIZE 35 M REUSE AUTOEXTEND ON NEXT 5120 K MAXSIZE 128G;
SQL> ALTER SYSTEM SET UNDO_TABLESPACE = "UNDOTBS1 ";
SQL> DROP TABLESPACE UNDOTBS2 INCLUDING CONTENTS AND DATAFILES;
SQL> exit
Oracle %

NOTE!

If you see this error: "ORA-30013: undo tablespace 'undotas1' is currently in use" takes 10-30 seconds, sometimes longer, and then re-execute the above command. You can also run "UNDOTBS1/UNDOTBS2" to check whether the DROP command can execute SQL> SELECT SEGMENT_NAME, XACTS, V. status from v $ rollstat v, DBA_ROLLBACK_SEGS WHERE TABLESPACE_NAME = 'undotbs1' AND SEGMENT_ID = USN; returned results:

"No rows selected"

If UNDOTBS1 is still in use, restart the ORACLE service and then perform the preceding steps.

--------------------------------------------------------------------------------

Undo tablespace loss caused by rman backup and recovery

About Oracle releasing over-used undo tablespace

Oracle undo

Oracle undo image data exploration

Oracle ROLLBACK and undo)

Installing Oracle 12C in Linux-6-64

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

--------------------------------------------------------------------------------

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.