Database Blog

Script to identify ASM diskgroup space

set serveroutput on declare v_diskgroup_name varchar2(50); v_total_space number(12); v_free_space number(12); v_pct_free number(6,3); begin for diskgroup_rec in (select name from v$asm_diskgroup) loop — — Get the total space for the current…

Read More

Materialized view refresh

MVIEW LOG  =========== col log_owner for a30 col master for a40 col log_table for a40 col last_purge_date for a30 col last_purge_status for 9999999 select log_owner,master,log_table,last_purge_date,last_purge_status from dba_mview_logs; MVIEW LOG SIZE…

Read More

ESTIMATE INDEX SIZE BEFORE CREATION

GATHER STATS FOR TABLE exec dbms_stats.gather_table_stats (ownname=>’&Owner’,tabname=>’&Table_name’,estimate_percent=>100,block_sample=>true,method_opt=>’FOR ALL COLUMNS size 254′); ESTIMATE INDEX SIZE set serveroutput on declare l_used_bytes number; l_alloc_bytes number; begin dbms_space.create_index_cost ( ddl => ‘create index test_indx…

Read More

ORA-46267 While initializing cleanup in audit table

BEGIN DBMS_AUDIT_MGMT.init_cleanup( audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD, default_cleanup_interval => 12 /* hours */); END; / ERROR at line 1: ORA-46267: Insufficient space in 'SYSAUX' tablespace, cannot complete operation ORA-06512: at "SYS.DBMS_AUDIT_MGMT", line…

Read More

RW 50015 : HTTP SERVER NOT RESPONDING

Error ======= Errors IN EBS POST INSTALL:RW 50015 : HTTP SERVER NOT RESPONDING 19/09/22 22:21:26 Start process ————————— /u01/oracle/VIS/inst/apps/VIS_ebs/ora/10.1.3/Apache/Apache/bin/apachectl startssl: execing httpd /u01/oracle/VIS/apps/tech_st/10.1.3/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot…

Read More

ORA -00600 while gather statistics

Error ===== BEGIN * ERROR at line 1: ORA-00600: internal error code, arguments: [qosdExpStatRead: expcnt mismatch], [], [], [], [], [], [], [], [], [], [], [] ORA-06512: at “SYS.DBMS_STATS”,…

Read More

Find the datafile used and free space

COL TABLESPACE_NAME FOR A30 COL FILE_NAME FOR A70 COL SIZE_GB FOR 99999 COL USED_GB FOR 99999 COL FREE_GB FOR 99999 COL %_Used FOR A15 SELECT Substr(df.tablespace_name,1,25) “Tablespace_Name”, Substr(df.file_name,1,70) “File_Name”, Round(df.bytes/1024/1024/1024,2)…

Read More

Deploying apex in tomcat

Apex Location ============= /PROD/PROD2020/apex Linux version ============= [oracle@ip-172-31-25-66 ~]$ cat /etc/system-release Amazon Linux 2 cd /PROD/PROD2020/apex @apex_rest_config.sql --password Pass#123 Unlock Accounts =============== ALTER USER APEX_LISTENER IDENTIFIED BY Pass#123 ACCOUNT UNLOCK;…

Read More

Upgrade database 19c registry components invalid

The below CATJAVA and JAVAVM components are invalid during 19c database upgrade. The below steps are needs to run to fix the corrupted database components. Steps :- 1)  Check DBA_REGISTRY_COMPONENTS…

Read More

Script to get metadata for schema creation and grants

select ‘create user ‘ ||username|| ‘ identified by values ”’ ||password|| ”’ default tablespace ‘ ||default_tablespace|| ‘ temporary tablespace ‘ ||temporary_tablespace|| ‘ profile ‘ ||profile||’;’ as sample from dba_users where…

Read More