"ORACLE" DDL operations on Permanent tablespace (11g)

Source: Internet
Author: User

To view the database default table space
Sql> Select Property_value from database_properties where property_name = ' default_permanent_tablespace ';

Property_value
--------------------------------------------------------------------------------
USERS

View the tablespace used by the user

sql> Select Owner,tablespace_name,round (sum (bytes)/1024/1024,2) "Used (M)"
2 from Dba_segments
3 Where owner = ' SCOTT '
4 GROUP BY Owner,tablespace_name
5 order by sum (bytes) desc;

OWNER Tablespace_name Used (M)
-------- --------------- ----------
SCOTT USERS. 31

View the amount of space occupied by all objects in the user

sql> Select Owner,tablespace_name,segment_name,round (sum (bytes)/1024/1024) "UserD (M)"
2 from Dba_segments
3 Where owner = ' SCOTT '
4 GROUP BY Owner,tablespace_name,segment_name,segment_type
5 order by sum (bytes) desc;

OWNER tablespace_name segment_na userd (M)
-------- --------------- ---------- ----------
SCOTT USERS EMP 0
SCOTT USERS pk_emp 0
SCOTT USERS pk_dept 0
SCOTT USERS DEPT 0
SCOTT USERS Salgrade 0

To view the amount of space remaining in a table space

sql> Select Tablespace_name, sum (bytes)/(1024*1024) Free_space from Dba_free_space Group by Tablespace_name;

Tablespace_name Free_space
--------------- ----------
Sysaux 34.1875
UNDOTBS1 98
USERS. 8125
SYSTEM 9.75
EXAMPLE 2.9375

"ORACLE" DDL operations on Permanent tablespace (11g)

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.