Run this sql statement SELECT /* + RULE */ 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 /* + RULE */ 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; |
Friday, July 15, 2011
Free & Used Space in Tablespace from SQL
Thursday, July 14, 2011
Number to text conversion from SQL
--- conversion of salary into words with decimal values-----
select sal,
decode(floor(sal),
0,'ZERO',
to_char(to_date(floor(sal),'J'),'JSP')) dollars,
decode(sal - floor(sal),
0,'ZERO',
to_char(to_date(((sal - floor(sal)) * 100),'J'),'JSP')) cents
from emp
--- conversion of salary into words without decimal values-----
select ename,sal,to_char(to_date(sal,'j'),'jsp')from emp;
select sal,
decode(floor(sal),
0,'ZERO',
to_char(to_date(floor(sal),'J'),'JSP')) dollars,
decode(sal - floor(sal),
0,'ZERO',
to_char(to_date(((sal - floor(sal)) * 100),'J'),'JSP')) cents
from emp
--- conversion of salary into words without decimal values-----
select ename,sal,to_char(to_date(sal,'j'),'jsp')from emp;
NTP Failed with Oracle 11gR2 RAC on Linux
Solution for ORA-16191 on Primary Database with Dataguard
Changing SYS password of PRIMARY database when STANDBY in place to avoid ORA-16191 Refrence DOC ID 806703.1
|
Calculate Dataguard required Bandwidth
|
GSD Is Used Only if 9i RAC Database is Present
|
Subscribe to:
Posts (Atom)
