how do see how much space is used and free in a tablespace
Answer Posted / mohapatra.gouranga@gmail.com
Best ans is:
SELECT df.tablespace_name "Tablespace",
df.bytes / (1024 * 1024) "Size (MB)",
SUM(fs.bytes) / (1024 * 1024) "Free (MB)",
Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "%
Free",
Round((df.bytes - SUM(fs.bytes)) * 100 /
df.bytes) "% Used"
FROM dba_free_space fs,
(SELECT tablespace_name,SUM(bytes) bytes
FROM dba_data_files
GROUP BY tablespace_name) df
WHERE fs.tablespace_name (+) = df.tablespace_name
GROUP BY df.tablespace_name,df.bytes
UNION ALL
SELECT df.tablespace_name tspace,
fs.bytes / (1024 * 1024),
SUM(df.bytes_free) / (1024 * 1024),
Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 /
fs.bytes), 1),
Round((SUM(fs.bytes) - df.bytes_free) * 100 /
fs.bytes)
FROM dba_temp_files fs,
(SELECT tablespace_name,bytes_free,bytes_used
FROM v$temp_space_header
GROUP BY tablespace_name,bytes_free,bytes_used) df
WHERE fs.tablespace_name (+) = df.tablespace_name
GROUP BY
df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used
ORDER BY 4 DESC;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
You create a private database link and upon
connection, fails with: ORA-2085: connects to
Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.
Database crashes. Corruption is found scattered among the file system neither of your doing nor of Oracle's. What database recovery options are available? Database is in archive log mode.
what is logical system in sap basis
What are the recovery models for a database? : sql server DBA
A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?
Draft one mock email requesting your non-technical management grant you downtime to (provide justification where applicable) complete the following tasks: (1) Generate statistics on a large table; (2) Generate an RDA – if you don't know what an RDA is please say so. (3) Rename datafiles.
What is dbcc? : sql server DBA
how can you get actual data change values from previous transactions in oracle?
How do you open a cluster administrator? : sql server DBA
suppose you want to audit specific activities on sensitive data. How can you achieve that?
Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.
What would you do with an "in-doubt" distributed transaction?
Can you tell me about your experience with the administration of COTS system..? Also, how do you set up seed data..?
how can a session indicate its interest in receiving alerts?