Provides you with an in-depth understanding of oracle tablespace Management

Source: Internet
Author: User

Oracle tablespace management is still unfamiliar to many new users who are new to oracle databases. The following describes how to manage tablespaces in oracle for your reference.

-- View table space usage
Select upper (F. TABLESPACE_NAME) "tablespace name ",
D. TOT_GROOTTE_MB "tablespace size (M )",
D. TOT_GROOTTE_MB-F. TOTAL_BYTES "used space (M )",
TO_CHAR (ROUND (D. TOT_GROOTTE_MB-F. TOTAL_BYTES)/D. TOT_GROOTTE_MB * 100,
2 ),
'1970. 99') "usage ratio ",
F. TOTAL_BYTES "Idle space (M )",
F. MAX_BYTES "maximum block (M )"
FROM (SELECT TABLESPACE_NAME,
ROUND (SUM (BYTES)/(1024*1024), 2) TOTAL_BYTES,
ROUND (MAX (BYTES)/(1024*1024), 2) MAX_BYTES
From sys. DBA_FREE_SPACE
Group by TABLESPACE_NAME) F,
(Select dd. TABLESPACE_NAME,
ROUND (SUM (DD. BYTES)/(1024*1024), 2) TOT_GROOTTE_MB
From sys. DBA_DATA_FILES DD
Group by dd. TABLESPACE_NAME) D
Where d. TABLESPACE_NAME = F. TABLESPACE_NAME
Order by 4 DESC

-- Adjust the data file size
Alter database datafile 'd:/PAM/pam_base1.dbf' resize 5000 m;

-- Modify the auto-increment of Files
Alter databasedatafile '/u07/oracle/oradata/train/media01.dbf' autoextend on next 100 m maxsize unlimited;

---- Modify Table space auto-Growth
Alter tablespace media autoextend on next 100 m maxsize unlimited;

-- Add data files
Alter tablespace name add datafile
''-- Path
Size ??? M -- size

The preceding section describes how to manage tablespaces in oracle.

Delete unused services in oracle service items

How to start Oracle databases in Linux

Implementation of Oracle redo log

How to modify the size of Oracle archive logs

Oracle Log File Management

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.