Posts Tagged ‘#woesofdba’

Check The Size Of Tablespaces of Oracle Database In Percentage With Suggestion

January 5th, 2026, posted in Oracle Queries
Share
set colsep |
set linesize 200 pages 100 trimspool on numwidth 14
col name format a15
col owner format a15
col "Used(GB)" format a10
col "Free(GB)" format a10
col "(Used)%" format a10
col "Size(GB)" format a10
col "MaxSize(GB)" format a11
col "(Used)%" format a10
col Suggestion format a26

select Name,"MaxSize(GB)","Size(GB)","Used(GB)","Free(GB)","(Used)%",
Case when AcctoMaxSizeUsed >= 80 then 'NeedtoAddDatafile' else '' end as Suggestion
from
(
SELECT d.status "Status", d.tablespace_name as Name,
TO_CHAR(NVL(a.maxbytes / 1024 / 1024 /1024, 0),'999999.90') "MaxSize(GB)",
TO_CHAR(NVL(a.bytes / 1024 / 1024 /1024, 0),'999999.90') "Size(GB)",
TO_CHAR(NVL(a.bytes - NVL(f.bytes, 0), 0)/1024/1024 /1024,'999999.90') "Used(GB)",
TO_CHAR(NVL(f.bytes / 1024 / 1024 /1024, 0),'999999.90') "Free(GB)",
TO_CHAR(NVL((a.bytes - NVL(f.bytes, 0)) / a.bytes * 100, 0), '990.00') "(Used)%",
TO_CHAR(NVL( (NVL(a.bytes, 0)) / a.maxbytes * 100, 0), '990.00') as AcctoMaxSizeUsed
FROM sys.dba_tablespaces d,
(select tablespace_name, sum(bytes) bytes, SUM( CASE WHEN autoextensible = 'YES' THEN maxbytes ELSE bytes END ) as maxbytes from dba_data_files group by tablespace_name) a,
(select tablespace_name, sum(bytes) bytes from dba_free_space group by tablespace_name) f WHERE
d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+) AND NOT
(d.extent_management like 'LOCAL' AND d.contents like 'TEMPORARY')
UNION ALL
SELECT d.status
"Status", d.tablespace_name as Name,
TO_CHAR(NVL(a.maxbytes / 1024 / 1024 /1024, 0),'999999.90') "MaxSize(GB)",
TO_CHAR(NVL(a.bytes / 1024 / 1024 /1024, 0),'999999.90') "Size(GB)",
TO_CHAR(NVL(t.bytes,0)/1024/1024 /1024,'999999.90') "Used(GB)",
TO_CHAR(NVL((a.bytes -NVL(t.bytes, 0)) / 1024 / 1024 /1024, 0),'999999.90') "Free(GB)",
TO_CHAR(NVL(t.bytes / a.bytes * 100, 0), '990.00') "(Used)%" ,
TO_CHAR(NVL( NVL(a.bytes, 0) / a.maxbytes * 100, 0), '990.00') as AcctoMaxSizeUsed
FROM sys.dba_tablespaces d,
(select tablespace_name, sum(bytes) bytes,SUM( CASE WHEN autoextensible = 'YES' THEN maxbytes ELSE bytes END ) as maxbytes from dba_temp_files group by tablespace_name) a,
(select tablespace_name, sum(bytes_cached) bytes from v$temp_extent_pool group by tablespace_name) t
WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = t.tablespace_name(+) AND
d.extent_management like 'LOCAL' AND d.contents like 'TEMPORARY'
) k order by suggestion
select file_name from dba_Data_Files where tablespace_name = 'TEST';
set line 999 pages 999 col FILE_NAME format a50 col tablespace_name format a15 Select tablespace_name, file_name, autoextensible, bytes/1024/1024/1024 "USEDSPACE GB", maxbytes/1024/1024/1024 "MAXSIZE GB" from dba_data_files
alter tablespace USERS add datafile 'D:\ORACLE11204\ORADATA\PEGA\USERS02.DBF' size 1G autoextend on next 500M maxsize 16G;
Share

ORA-00059: Maximum Number Of DB_FILES Exceeded

December 8th, 2025, posted in Oracle Queries
Share
SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf' size 20G;
alter tablespace DATA add datafile '/u01/data/data15.dbf' size 20G
*
ERROR at line 1:
ORA-00059: maximum number of DB_FILES exceeded
SQL> sho parameter db_files;
 NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_files                             integer    500
 SQL> select count(*) from dba_data_files;
COUNT(*)
----------
        496
SQL> alter system set db_files = 1000 scope = spfile;
System altered.
SQL>shutdown immediate;
SQL>startup
SQL> sho parameter db_files;
 NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_files                             integer            1000
SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf' size 20G;
Share

Oracle Database 23AI Session Related Scripts.

December 1st, 2025, posted in Oracle Queries
Share

Share

Oracle EBS R12.1.1 File Locations

November 16th, 2025, posted in Oracle EBS Application
Share
Share

IAP-CANNOT READ FIELD (FIELDNAME=PARAMETER.CONFIG)

September 8th, 2025, posted in Oracle EBS Application
Share
#woesOfDBA, #WoesOfDba, #woesOfDBA, #WoesOfDba, woes of dba, Woes Of Dba, immam dba,dba immam, #immam_dba, #immamDba, #dbaimmam, #dba_immam, IAP-CANNOT READ FIELD,
Refer Metalink Doc id :Concurrent Processing - Error AP-CANNOT
READ FIELD (FIELDNAME=PARAMETER.CONFIG) When Viewing the 
Concurrent Request Output [ID 466410.1]
Share