Archive

Archive for July, 2013

Recompile database objects (utlrp) fails with: ORA-04045: errors during recompilation/revalidation of SYS.DBMS_REGISTRY_SYS

July 16th, 2013 3 comments

Hi just discovered another flaw when having the workaround for CVE-2012-3132 in place. If you try to compile invalid database objects it will fail with:

SQL> @$ORACLE_HOME/rdbms/admin/utlrp
SELECT dbms_registry_sys.time_stamp('utlrp_bgn') as timestamp from dual
 *
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of SYS.DBMS_REGISTRY_SYS
ORA-04067: not executed, package body "SYS.NAME_SECURITY" does not exist

 

The solution for this is:

Either disable the trigger (alter system disable trigger sys.NAMECHECK_BEFORE_DDL_DB_TRG) OR disable the execution of all triggers on system level (ALTER SYSTEM SET "_system_trig_enabled" = FALSE;)

Categories: Oracle in general Tags:

Quick & Dirty: AWR Query for Tablespace groth

July 1st, 2013 No comments

The query:

select
  rtime as time,
  sn.snap_id,
  ts.name,
  round(tablespace_size*tsb.block_size/1024/1024,0) SIZE_MB,
  round(tablespace_maxsize*tsb.block_size/1024/1024,0) MAXSIZE_MB,
  round(tablespace_usedsize *tsb.block_size/1024/1024,0) USEDSIZE_MB
from
  dba_hist_tbspc_space_usage tsu,
  v$tablespace ts,
  dba_hist_snapshot sn,
  dba_tablespaces tsb
where
  tsu.tablespace_id=ts.ts#
  and sn.snap_id= tsu.snap_id
  --and ts.name='USERS'
  and tsb.tablespace_name=ts.name
order by
sn.snap_id desc, tablespace_name;

 

Sample output;

TIME                 SNAP_ID  NAME      SIZE_MB   MAXSIZE_MB   USEDSIZE_MB
07/01/2013 11:00:30    644    SYSAUX    64000     65536        2154
07/01/2013 11:00:30    644    SYSTEM    6144      8192         2884
07/01/2013 11:00:30    644    TOOLS     100       65536        1
07/01/2013 11:00:30    644    UNDOTBS1  65535     65535        54
07/01/2013 11:00:30    644    USERS     8         8            7
07/01/2013 10:00:28    643    SYSAUX    64000     65536        2154
07/01/2013 10:00:28    643    SYSTEM    6144      8192         2884
07/01/2013 10:00:28    643    TOOLS     100       65536        1
07/01/2013 10:00:28    643    UNDOTBS1  65535     65535        58
07/01/2013 10:00:28    643    USERS     8         8            7
Categories: Oracle in general Tags: