Skip to main content
Defragment workflow related tables in r12
 
References-
1.    How to Reorganize Workflow Tables? (Doc ID 388672.1)
2.    EBS Workflow (WF) Analyzer (Doc ID 1369938.1)

Points to Remember –
   
Some workflow tables are associated to queues so that it is necessary to use the advance queuing instructions to reorganize them.

For tables other than queue tables, please refer to different notes created by RDBMS team to reorganize tables. This activity depends on the RDBMS version.

     
Defragment tables in workflow r12
Verify tables are not associated to queues –
SQL> select queue_table from dba_queue_tables
  2  where queue_table like '%WF%';
QUEUE_TABLE
------------------------------
WF_CONTROL
WF_DEFERRED
WF_DEFERRED_TABLE_M
WF_ERROR
WF_IN
WF_INBOUND_TABLE
WF_JAVA_DEFERRED
WF_JAVA_ERROR
WF_JMS_IN
WF_JMS_JMS_OUT
WF_JMS_OUT
WF_NOTIFICATION_IN
WF_NOTIFICATION_OUT
WF_OUT
WF_OUTBOUND_TABLE
WF_REPLAY_IN
WF_REPLAY_OUT
WF_SMTP_O_1_TABLE
WF_WS_JMS_IN
WF_WS_JMS_OUT
WF_WS_SAMPLE
WF_BPEL_QTAB

Note: We are not going to cover De-fragment of advance queuing tables in this document.


List of workflow related tables that will be defragmented -
'WF_ITEMS',
'WF_ITEM_ACTIVITY_STATUSES',
'WF_ITEM_ATTRIBUTE_VALUES',
'WF_NOTIFICATIONS',
'WF_NOTIFICATION_ATTRIBUTES',
'WF_COMMENTS',
'WF_LOCAL_USER_ROLES'

Shutdown workflow services from frontend
1. Login as sysadmin
 

2. Stop Workflow Services

 



Perform shrink table operation
Check for defragmentation on these tables 
set lines 1000
col TOTAL_SIZE for a20
select table_name,round(((blocks*8/1024)),2)||'MB' "TOTAL_SIZE", round((num_rows*avg_row_len/1024/1024),2)||'Mb' "ACTUAL_SIZE", round(((blocks*8/1024)-(num_rows*avg_row_len/1024/1024)),2) "FRAGMENTED_SPACE"
from dba_tables
where table_name IN (
'WF_ITEMS',
'WF_ITEM_ACTIVITY_STATUSES',
'WF_ITEM_ATTRIBUTE_VALUES',
'WF_NOTIFICATIONS',
'WF_NOTIFICATION_ATTRIBUTES',
'WF_COMMENTS',
'WF_LOCAL_USER_ROLES'
);
 

 
 
Check for tablespace sizes –


Enable Row movement –

alter table     APPLSYS.WF_ITEMS         ENABLE ROW MOVEMENT;
alter table     APPLSYS.WF_ITEM_ACTIVITY_STATUSES        ENABLE ROW MOVEMENT;
alter table     APPLSYS.WF_ITEM_ATTRIBUTE_VALUES         ENABLE ROW MOVEMENT;
alter table     APPLSYS.WF_NOTIFICATIONS         ENABLE ROW MOVEMENT;
alter table     APPLSYS.WF_NOTIFICATION_ATTRIBUTES       ENABLE ROW MOVEMENT;
alter table     APPLSYS.WF_COMMENTS      ENABLE ROW MOVEMENT;
alter table     APPLSYS.WF_LOCAL_USER_ROLES      ENABLE ROW MOVEMENT;


 
 
 
 
 
 
 
 
Shrink space with compact –

alter table     APPLSYS.WF_ITEMS         SHRINK SPACE COMPACT;
alter table     APPLSYS.WF_ITEM_ACTIVITY_STATUSES        SHRINK SPACE COMPACT;
alter table     APPLSYS.WF_ITEM_ATTRIBUTE_VALUES         SHRINK SPACE COMPACT;
alter table     APPLSYS.WF_NOTIFICATIONS         SHRINK SPACE COMPACT;
alter table     APPLSYS.WF_NOTIFICATION_ATTRIBUTES       SHRINK SPACE COMPACT;
alter table     APPLSYS.WF_COMMENTS      SHRINK SPACE COMPACT;
alter table     APPLSYS.WF_LOCAL_USER_ROLES      SHRINK SPACE COMPACT;



Shrink space –

alter table     APPLSYS.WF_ITEMS         shrink space;
alter table     APPLSYS.WF_ITEM_ACTIVITY_STATUSES        shrink space;
alter table     APPLSYS.WF_ITEM_ATTRIBUTE_VALUES         shrink space;
alter table     APPLSYS.WF_NOTIFICATIONS         shrink space;
alter table     APPLSYS.WF_NOTIFICATION_ATTRIBUTES       shrink space;
alter table     APPLSYS.WF_COMMENTS      shrink space;
alter table     APPLSYS.WF_LOCAL_USER_ROLES      shrink space;


Disable row movement –
 
alter table     APPLSYS.WF_ITEMS         disable ROW MOVEMENT;
alter table     APPLSYS.WF_ITEM_ACTIVITY_STATUSES        disable ROW MOVEMENT;
alter table     APPLSYS.WF_ITEM_ATTRIBUTE_VALUES         disable ROW MOVEMENT;
alter table     APPLSYS.WF_NOTIFICATIONS         disable ROW MOVEMENT;
alter table     APPLSYS.WF_NOTIFICATION_ATTRIBUTES       disable ROW MOVEMENT;
alter table     APPLSYS.WF_COMMENTS      disable ROW MOVEMENT;
alter table     APPLSYS.WF_LOCAL_USER_ROLES      disable ROW MOVEMENT;

Gather fresh statistics on these tables –

exec fnd_stats.gather_table_stats(OWNNAME=>'APPLSYS',tabname =>'WF_ITEMS',percent=>30,CASCADE=>TRUE,degree=>4);
exec fnd_stats.gather_table_stats(OWNNAME=>'APPLSYS',tabname =>'WF_ITEM_ACTIVITY_STATUSES',percent=>30,CASCADE=>TRUE,degree=>4);
exec fnd_stats.gather_table_stats(OWNNAME=>'APPLSYS',tabname =>'WF_ITEM_ATTRIBUTE_VALUES',percent=>30,CASCADE=>TRUE,degree=>4);
exec fnd_stats.gather_table_stats(OWNNAME=>'APPLSYS',tabname =>'WF_NOTIFICATIONS ',percent=>30,CASCADE=>TRUE,degree=>4);
exec fnd_stats.gather_table_stats(OWNNAME=>'APPLSYS',tabname =>'WF_NOTIFICATION_ATTRIBUTES',percent=>30,CASCADE=>TRUE,degree=>4);
exec fnd_stats.gather_table_stats(OWNNAME=>'APPLSYS',tabname =>'WF_ITEMS',percent=>30,CASCADE=>TRUE,degree=>4);
exec fnd_stats.gather_table_stats(OWNNAME=>'APPLSYS',tabname =>'WF_LOCAL_USER_ROLES',percent=>30,CASCADE=>TRUE,degree=>4);






Recheck table and tablespace sizes



 

Start workflow services from frontend


Try sending a test mail





Check invalid object count and run utlrp
@$ORACLE_HOME/rdbms/admin/utlrp.sql
SQL> select count(*) from dba_objects where status='INVALID';


Comments

Popular posts from this blog

Logfile locations in EBS r12.1 and EBS r12.2

Startup/shutdown Apps tier services are started and stopped frequently and we must know logfiles when troubleshooting startup/shutdown issues. $INST_TOP/logs/appl/admin/log $INST_TOP/logs/appl/admin/log Apache OHS being part of opmn in r12.1 has continued in r12.2. Logfile locations for troubleshooting have been changed $INST_TOP/logs/ora/10.1.3/Apache/error_log[timestamp] $INST_TOP/logs/ora/10.1.3/opmn/HTTP_Server~1.log $IAS_ORACLE_HOME/instances/*/diagnostics/logs/OHS/*/*log*   OPMN Logfile locations for r12.1 and r12.2 have been changed $INST_TOP/logs/ora/10.1.3/opmn/opmn* $IAS_ORACLE_HOME/instances/*/diagnostics/logs/OPMN/opmn/* Oacore oacore in r12.1 is oc4j component and part of 10gAS. However, in r12.2, oacore is now a managed server for weblogic server $LOG_HOME/ora/10.1.3/j2ee/oacore/oacore*/ $LOG_HOME/ora/10.1.3/j2ee/oacore/oacore*/ $LOG_HOME/ora/10.1.3/opmn/oacore*/oacor...

Oracle EBS r12 migration to Solaris SPARC ** issues and solutions

Let me share a list of issues I faced when migrating a single node Oracle ebs r12.1.3 environment from Linux x86_64 to multinode Solaris SPARC machines. I have already shared ppt that was point of discussion before migration. Oracle ebs db platform migration Please note that below is set of issues and respective solutions while migration. I have not covered steps for migration in this post. I would also like to share list of references from metalink that were very handy during complete migration process. ·          Export/import process for 12.0 or 12.1 using 11gR1 or 11gR2 (Doc ID 741818.1) -           This document will be primarily used for database migration. ·          Application Tier Platform Migration with Oracle E-Business Suite Release 12 (Doc ID 438086.1) -           Apps tier will b...