Monday, March 30, 2015

Gather Schema Stats / Fix Locks / Performance issues

Below commands might help to resolve the performance issues or Locks in Oracle Apps.
Be cautious while running below steps. 

Follow step wise. You need to have apps privilege to database.



  1. select distinct owner, table_name, stattype_locked  from dba_tab_statistics where stattype_locked is not null; (Find all locks)
  2. exec dbms_stats.unlock_schema_stats('SYS') ; 
  3. exec dbms_stats.unlock_table_stats('SYS','WRH$_SYSSTAT');
  4. exec dbms_stats.gather_table_stats(ownname => 'PO', tabname => 'PO_SESSION_GT', cascade=> true, degree=> 8); (Execute Gather schema stats on Table if needed or next step to execute on whole schema)
  5. exec dbms_stats.gather_schema_stats(ownname=>'PO', estimate_percent=>40)


No comments:

Post a Comment