Database Blog

Query to Display Archive Log Generation by Day in Oracle

SET PAGESIZE 70 SET LINESIZE 400 COL “Generation Date” FORMAT a30 SELECT TRUNC(completion_time)  “Generation Date” , round(SUM(blocks*block_size)/1048576,0) “Total for the Day in MB” FROM gv$archived_log GROUP BY TRUNC(completion_time) ORDER BY…

Read More

Adding a Datafile to Temp Tablespace

Query to see Current Temp Datafiles State   select d.TABLESPACE_NAME, d.FILE_NAME, d.BYTES/1024/1024 SIZE_MB, d.AUTOEXTENSIBLE, d.MAXBYTES/1024/1024 MAXSIZE_MB, d.INCREMENT_BY*(v.BLOCK_SIZE/1024)/1024 INCREMENT_BY_MB from dba_temp_files d, v$tempfile v where d.FILE_ID = v.FILE# order by d.TABLESPACE_NAME,…

Read More

Adding a Datafile to Tablespace

Query to see Current Datafiles State   select d.TABLESPACE_NAME, d.FILE_NAME, d.BYTES/1024/1024 SIZE_MB, d.AUTOEXTENSIBLE, d.MAXBYTES/1024/1024 MAXSIZE_MB, d.INCREMENT_BY*(v.BLOCK_SIZE/1024)/1024 INCREMENT_BY_MB from dba_data_files d, v$datafile v where d.FILE_ID = v.FILE# order by d.TABLESPACE_NAME, d.FILE_NAME;…

Read More

Query To Check Tablespace Allocated Size and Free Size in GB

Select b.tablespace_name, tbs_size SizeGB, a.free_space FreeGB from (select tablespace_name, round(sum(bytes)/1024/1024/1024,1) as free_space from dba_free_space group by tablespace_name UNION select tablespace_name, round((free_space)/1024/1024/1024,1) as free_space from            …

Read More

OPATCH_JAVA_ERROR : An exception of type “OPatchException” has occurred:

ERROR: $opatch lsinventory OPATCH_JAVA_ERROR : An exception of type “OPatchException” has occurred: Can not get a list of inventory on this home. ERROR: OPatch failed because of Inventory problem. Solution:…

Read More

Unable to connect sqlplus after cloning oracle_home

ISSUE: Unable to connect sqlplus after cloning oracle_home Solution: OSDBA_GROUP should be mentioned while cloning ORACLE_HOME as mentioned below $ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE=”/scratch/aime/clone” ORACLE_HOME=”/u01/app/oracle/dbhome” OSDBA_GROUP=dba OSOPER_GROUP=oper -defaultHomeName OR Take Backup of…

Read More

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA ERRORCODE = 1 ERRORCODE_END $ Solution ========= s_instLocalListener is not correct in database server context file 1. Take Backup of Context…

Read More

ORA-17627: ORA-01041: internal error. hostdef extension doesn’t exist

ERROR: ORA-17627: ORA-01041: internal error. hostdef extension doesn’t exist ORA-19849: error while reading backup piece from service PROD ORA-03113: end-of-file on communication channel ORA-19558: error de-allocating device ORA-19557: device error,…

Read More

Generating and Deploying a New Wallet for Non-TLS Enabled Release 12.2 Environments(Doc ID 2555355.1)

1) Log in as the user that owns the application tier installation (this is usually applmgr or oracle) 2) Source the run file system environment and the $FMW_HOME/SetWebtier.env file Note:…

Read More

Steps to reformat the corrupted free blocks.

Please find the steps done below for one type of block but can be used for any block.   create table demo.wcc99(n number, c varchar2(4000)) nologging tablespace DISC pctfree 99…

Read More