Three operations of the VB. net undo tablespace

Source: Internet
Author: User

I like the VB. net undo tablespace very much. In my work, I also like to sum up the experience and lessons on the VB. NET UNDO tablespace. Let's talk about this in detail. Create a VB. net undo tablespace. The VB. net undo tablespace is used to store UNDO data, and no Data Objects (tables, indexes, and clusters) can be created in the UNDO tablespace)

1. Use the create database Command to CREATE the UNDO tablespace.

When you use the create database Command to CREATE a DATABASE, you can CREATE an undo tablespace by specifying the undo tablespace option. Example:

 
 
  1. CREATE DATABASE db01  
  2. …  
  3. UNDO TABLESPACE undotbs_01  
  4. DATAFILE ‘/u01/oracle/rbdb1/undo0101.dbf’ SIZE 30M; 

Note: The undo tablespace clause is not mandatory. If the automatic UNDO management mode is used and this clause is not specified, the undo tablespace named SYS_UNDOTBS is automatically generated when the database is created.

2. Use the create undo tablespace command to CREATE an undo tablespace.

 
 
  1. CREATE UNDO TABLESPACE undotbs3  
  2. DATAFILE ‘D:demoundotbs3.dbf’ SIZE 10M; 

Modify the VB. net undo tablespace and use the alter tablespace command to modify the undo tablespace. When the transaction uses up the undo tablespace, use alter tablespace... Add datafile: ADD data files. When the disk of the undo tablespace is full, use alter tablespace... Rename datafiel command to move data files to other disks. Use alter database... OFFLINE/ONLINE: OFFLINE/ONLINE tablespaces. When the database is in ARCHIVELOG mode, use alter tablespace... The begin backup/end backup command backs up the UNDO tablespace.

Switch to the VB. net undo tablespace.

After the routine is started and the database is opened, a specific routine can only use one UNDO tablespace at a time. Switching an UNDO tablespace refers to the UNDO tablespace currently used by the stop routine and starting other UNDO tablespaces, the following describes how to switch the undotbs2 tablespace by taking the Enable undotbs2 tablespace as an example.

 
 
  1. ALTER SYSTEM SET undo_tablespace=undotbs02; 

In the RAC (Real Application Cluster) mechanism, different routines must use independent UNDO tablespace instead of the same UNDO tablespace.

Delete the VB. net undo tablespace.

The VB. net undo tablespace being used by the current routine cannot be deleted. If you are sure to delete the UNDO tablespace being used by the current routine, you should first switch the UNDO tablespace. Then, delete the corresponding UNDO tablespace. Drop tablespace undotbs3;
1. Determine the UNDO tablespace used by the current routine. Show parameter undo_tablespace
2. display all UNDO tablespace of the database. SELECT tablespace_name FROMdba_tablespaces WHERE contents = 'undo ';
3. displays the UNDO tablespace statistics.

When using the automatic UNDO management mode, you need to properly set the size of the UNDO tablespace. For example, to reasonably plan the size of the UNDO tablespace, you should collect the statistics of the UNDO tablespace during the peak hours of database operation. Finally, the size of the UNDO tablespace is determined based on the statistics. You can collect UNDO statistics by querying the dynamic performance view V % UNDOSTAT.

 
 
  1. SELECT TO_CHAR(BEGIN_TIME,’HH24:MI:SS’) BEGIN_TIME, TO_CHAR
    (END_TIME,’HH24:MI:SS’) END_TIME, UNDOBLKS  
  2. FROM V$UNDOSTAT; 

BEGIN_TIME indicates the start statistical time, END_TIME indicates the end statistical time, And UNDOBLKS indicates the number of data blocks occupied by UNDO data. Oracle generates a statistical line every 10 minutes.

  1. Oracle tablespace recovery makes you no longer worry about database errors
  2. Summary about the tablespace transmitted by VB. NET
  3. Oracle UNDO tablespace Reconstruction Method
  4. Five-minute master of Oracle tablespace
  5. Two-step Oracle user tablespace proficiency

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.