Current location - Loan Platform Complete Network - Big data management - How to query the default user tablespace size of oracle database
How to query the default user tablespace size of oracle database
-Oracle queries the user tablespace.

Select * from user _ all _ tables select * from user source; select * from all _ users

select * from DBA _ users select * from v $ Session; SELECT * FROM USER _ ROLE _ PRIVSselect * from session _ privsSELECT * FROM DBA _ ROLE _ PRIVSselect * from dba _ roles

Select a name from the V $ database; Select a.file _ id "fileno",

A. Tablespace name "Tablespace name",

A.bytes "bytes",

A.bytes-sum(nvl(b.bytes, 0)) "used",

sum(nvl(b.bytes,0))“Free”,

sum(nvl(b.bytes,0))/a . bytes * 100“% free”

From database administrator data file a, database administrator free space b

Where a. File ID = b. File ID (+)

Group by a. Tablespace name, a. File id, a. Bytes

order by a.tablespace _ name