SQL to get the redo volume historically

Redo volume is related to archive log volume, but not identical. Here is and SQL to get the actual cumulated redo sizes from the AWR. select * from ( SELECT TO_CHAR(begin_interval_time, 'yyyymmddhh24mi') tm, s2.instance_number, (s2.value - s1.value)/1024/1024 redo_size FROM dba_hist_sysstat s1 , dba_hist_sysstat s2, dba_hist_snapshot sn WHERE s1.stat_name = 'redo size' and s2.stat_name = 'redo …

SQL to get the redo volume historically weiterlesen

How to estimate the parallel degree for historical SQL

In analysis of SQL stats,  execution times are cumulated for all parallel servers. This makes it difficult to derive the correct execution times from the AWR. Create some test data: The test script:   Output:   Though the SQL runtime was 1,27s, the accumulated elapsed time in v$sqlstats is 17,07s, due to the fact that all parallel …

How to estimate the parallel degree for historical SQL weiterlesen

How to use booleans in SQL and avoid ORA-00904

Try this: select true from dual; ORA-00904: "TRUE": ungültiger Bezeichner The reason behind this behavior is that TRUE and FALSE are only available in PL/SQL, not in SQL. Booleans are simply not usable in SQL queries. How to work around this limitation? The SYS.DIUTIL package's BOOL_TO_INT() function provides a hint. Let's see. declare   n number;   v_true …

How to use booleans in SQL and avoid ORA-00904 weiterlesen

How to include time zone and daylight saving settings in scheduler jobs

In case one needs to include time zone and daylight savings information in a job schedule, it must be supplied in the start_date parameter. The calendar arithmetic will then consider this information. BEGIN dbms_scheduler.create_job( job_name => 'some_job', job_type => 'PLSQL_BLOCK', job_action => 'begin null; end;', repeat_interval => 'freq=hourly; bymonthday=1,2,3; byhour=12,13,14;', start_date => trunc(systimestamp) at time …

How to include time zone and daylight saving settings in scheduler jobs weiterlesen

Logon problems in OMS12C

Logging on as sysman to the OMS console fails, apparently due to incorrect username/password. Rebooting the OMS did not help. emoms.log shows the following: 2015-11-02 11:05:14,712 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR audit.AuditLogHandler auditLog.378 - Could not log the audit record java.sql.SQLException: ORA-14400: Eingefügter Partitionsschlüssel kann keiner Partition zugeordnet werden ORA-06512: in "SYSMAN.MGMT_AUDIT", Zeile …

Logon problems in OMS12C weiterlesen