Monday, September 9, 2019

ORA 1654

ORA 1654 Oracle Tablespace Error



-- Login as SYSTEM

--Total Space 
select distinct tablespace_name , file_name,file_id , bytes/1024/1024 as total_space
from dba_data_files 
where tablespace_name like '%GLD%'
order by 3

--Free Space 
select distinct file_id,tablespace_name,bytes/1024/1024 as free 
from dba_free_space
where tablespace_name like '%GLD%'


SELECT SUBSTR (df.file_id, 1, 3) "ID#", 
df.tablespace_name, 
df.BYTES "Total Bytes", 
nvl(SUM (fs.BYTES),0) "Bytes Free", 
nvl((100 * ((SUM (fs.BYTES)) / df.BYTES)),0) "% Free", 
nvl(df.BYTES - SUM (fs.BYTES),df.BYTES) "Bytes Used", 
nvl((100 * ((df.BYTES - SUM (fs.BYTES)) / df.BYTES)),100) "% Used" 
FROM SYS.dba_data_files df, SYS.dba_free_space fs 
WHERE df.file_id = fs.file_id (+)
and df.tablespace_name = :tb 
GROUP BY df.file_id, df.tablespace_name, df.BYTES, df.blocks 
ORDER BY df.tablespace_name,nvl((100 * ((df.BYTES - SUM (fs.BYTES)) /df.BYTES)),100) desc 
 

alter database datafile 'E:\ORACLE\PRODDATA\GLD02.DBF' resize 1700M

alter tablespace GLD add datafile 'E:\ORACLE\PRODDATA\GLD02.DBF' size 500M

alter tablespace APPLSYSD add datafile 'E:\ORACLE\PRODDATA\APPLSYSD04.DBF' size 1200M

0 comments:

Post a Comment