Oracle-EBS-SQL

Library of Oracle EBS SQLs for operational Excel and ECC reporting, Discoverer replacement, Oracle EBS performance tuning and rapid report development.

View the Project on GitHub Enginatics/Oracle-EBS-SQL

DBA AWR Settings

Description:

Automatic workload repository settings such as retention period, snapshot interval and number of top SQLs to capture (from table underlying the view dba_hist_wr_control). Note that for executing Blitz Report queries on AWR data, you require a Diagnostic pack license as explained in Oracle’s note 1490798.1: https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1490798.1

topnsql=DEFAULT means the database captures the top 30 SQLs from 5 different categories (Elapsed Time, CPU Time, Parse Calls, Shareable Memory, Version Count) for each snapshot interval. So the default setting would capture a maximum of 150 different SQLs per snapshot, depending on system load.

Settings are modified by package dbms_workload_repository where interval parameters passed are specified in minutes. Example: A 35 days retention with snapshot intervals of 30 minutes and 50 top SQLs captured is set as follows:

exec dbms_workload_repository.modify_snapshot_settings (retention=>35*1440, interval=>30, topnsql=>50);

A common problem is that AWR records are not getting purged, see Oracle note 1292724.1. If column ‘Orphan Sess History Count’ is bigger than zero, then orphan records not belonging to the current DB’s snapshots should get purged either ‘manually’ table by table:

delete /*+ parallel(x 4) */ from wrh$_active_session_history wash where (wash.dbid, wash.instance_number, wash.snap_id) not in (select ws.dbid, ws.instance_number, ws.snap_id from wrm$_snapshot ws) alter table wrh$_active_session_history shrink space cascade;

or by a generic script:

begin for c in ( select x.* from ( select distinct dt.num_rows, dt.row_movement, dtc.table_name, listagg(dtc.column_name,’, ‘) within group (order by dtc.column_name) over (partition by dtc.table_name) table_columns, count() over (partition by dtc.table_name) column_count from dba_tables dt, dba_tab_columns dtc where dt.owner=dtc.owner and dt.table_name=dtc.table_name and dtc.owner=’SYS’ and dtc.table_name like ‘WRH$_%’ escape ‘' and dtc.column_name in (‘DBID’,’INSTANCE_NUMBER’,’SNAP_ID’) ) x where x.table_columns in (‘DBID, INSTANCE_NUMBER, SNAP_ID’,’DBID, SNAP_ID’) order by x.num_rows desc ) loop if c.table_columns=’DBID, INSTANCE_NUMBER, SNAP_ID’ then execute immediate ‘ delete /+ parallel(x 4) / ‘||c.table_name||’ x where x.dbid is not null and x.instance_number is not null and x.snap_id is not null and (x.dbid, x.instance_number, x.snap_id) not in (select ws.dbid, ws.instance_number, ws.snap_id from wrm$_snapshot ws)’; dbms_output.put_line(sql%rowcount||’ records deleted from ‘||c.table_name); elsif c.table_columns=’DBID, SNAP_ID’ then execute immediate ‘ delete /+ parallel(x 4) */ ‘||c.table_name||’ x where x.dbid is not null and x.snap_id is not null and (x.dbid, x.snap_id) not in (select ws.dbid, ws.snap_id from wrm$_snapshot ws)’; dbms_output.put_line(sql%rowcount||’ records deleted from ‘||c.table_name); end if; if c.row_movement=’ENABLED’ then execute immediate ‘alter table ‘||c.table_name||’ shrink space cascade’; dbms_output.put_line(c.table_name||’ shrinked’); end if; commit; end loop; end;

To purge obsolete data from old DBIDs: http://www.strategicdbs.com/p/removing-old-dbid-data.html

begin for c in (select distinct dfus.dbid from dba_feature_usage_statistics dfus where dfus.dbid not in (select vd.dbid from v$database vd)) loop dbms_swrf_internal.unregister_database(c.dbid); end loop; delete wri$_dbu_usage_sample wdus where wdus.dbid not in (select vd.dbid from v$database vd); delete wri$_dbu_feature_usage wdfu where wdfu.dbid not in (select vd.dbid from v$database vd); delete wri$_dbu_high_water_mark wdhwm where wdhwm.dbid not in (select vd.dbid from v$database vd); delete wri$_dbu_cpu_usage wdcu where wdcu.dbid not in (select vd.dbid from v$database vd); delete wri$_dbu_cpu_usage_sample wdcus where wdcus.dbid not in (select vd.dbid from v$database vd); commit; end;

Parameters

Diagnostic Pack enabled, Container Data

Used tables

dba_hist_wr_control, v$database, dba_hist_database_instance, dba_hist_snapshot

Categories

Diagnostic Pack, Enginatics

DBA SGA+PGA Memory Configuration

Dependencies

If you would like to try one of these Oracle EBS SQLs without having Blitz Report installed, note that some of the reports require functions from utility package xxen_util.

Example Report

DBA AWR Settings 11-May-2017 125144.xlsx

Report SQL

www.enginatics.com/reports/dba-awr-settings/

Blitz Report™ import options

DBA_AWR_Settings.xml

Oracle E-Business Suite Reporting Library

We provide an open source Oracle EBS SQLs as a part of operational and project implementation support toolkits for rapid Excel reports generation.

Blitz Report™ is based on Oracle EBS forms technology, and hence requires minimal training. There are no data or performance limitations since the output files are created directly from the database without going through intermediate file formats such as XML.

Blitz Report can be used as BI Publisher and Oracle Discoverer replacement tool. Standard Oracle BI Publisher and Discoverer reports can also be imported into Blitz Report for immediate output to Excel. Typically, reports can be created and version tracked within hours instead of days. The concurrent request output automatically opens upon completion without the need for re-formatting.

The Filters, Columns, Rows and Values fields are used to create and deliver the data in pivot table format with full drill down to details.

Blitz Report Pivots

The Excel template upload functionality in Blitz Report allows users to create their own layouts by uploading an Excel template with additional sheets and charts, automatically refreshed when the report runs again. This allows to create custom dashboards and more advanced visualizations of report data.

Blitz Report Dashboard

You can download and use Blitz Report free of charge for your first 30 reports.

The installation and implementation process usually takes less than 1 hour; you can refer to our installation and user guides for specific details.

If you would like to optimize your Oracle EBS implementation and or operational reporting you can visit www.enginatics.com to review great ideas and example usage in blog. Or why not try for yourself in our demo environment.

AlertCRM Foundation
Contracts CoreLease and Finance Management
PaymentsProcess Manufacturing
Process Manufacturing InventoryPublic Sector Financials
Shipping ExecutionXML Publisher
CapacityLegal Entity Configurator
ProjectsService Contracts
Applications DBAEnterprise Asset Management
Installed BasePayroll
Subledger AccountingWorkflow
Advanced PricingEnterprise Command Center
Bills of MaterialE-Business Tax
Property ManagerAdvanced Supply Chain Planning
Work in ProcessHuman Resources
Master Scheduling/MRPOrder Management
Cash ManagementCost Management
PurchasingDiscoverer
AssetsReceivables
General LedgerPayables
Blitz ReportInventory
Database AdministrationApplication Object Library

Useful Links

Blitz Report™ – World’s fastest reporting and data upload for Oracle EBS

Oracle Discoverer replacement – importing worksheets into Blitz Report™

Blitz Report™ Toolkits

Supply Chain Hub by Blitz Report™

Blitz Report™ customers

Oracle EBS Reporting Blog

Oracle EBS Reporting

© 2024 Enginatics