tools for the oracle applications dba toolbox jeff slavitz oracle applications dba computer...
TRANSCRIPT
Tools for the Oracle Tools for the Oracle Applications DBA ToolboxApplications DBA Toolbox
Jeff SlavitzJeff SlavitzOracle Applications DBAOracle Applications DBA
Computer Creations IncComputer Creations [email protected]@OracleAppsPro.Com
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
22
Three of my Favorite ToolsThree of my Favorite Tools
FNDLOAD to migrate application setup FNDLOAD to migrate application setup datadata
SED to edit context filesSED to edit context files Workflow check and cleanup scriptsWorkflow check and cleanup scripts
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
33
Moving Setup Data between Moving Setup Data between InstancesInstances
How do you migrate setup data between How do you migrate setup data between instances?instances? Concurrent program definitionsConcurrent program definitions Value setsValue sets
Traditional method is manual data entryTraditional method is manual data entry SlowSlow Prone to errorProne to error
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
44
Moving Setup Data between Moving Setup Data between InstancesInstances
A tool exists to automate setup dataA tool exists to automate setup data It’s free!It’s free! It’s supported by OracleIt’s supported by Oracle It’s written by OracleIt’s written by Oracle It’s used by OracleIt’s used by Oracle
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
55
FNDLOADFNDLOAD
Not well publicized but very useful!Not well publicized but very useful! Similar to database export/import but for Similar to database export/import but for
certain application objectscertain application objects Downloads application object into portable Downloads application object into portable
text filetext file Text file can be edited to create new Text file can be edited to create new
objectsobjects Text file can be uploaded into any instanceText file can be uploaded into any instance Works between version of Applications!Works between version of Applications!
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
66
FNDLOADable ObjectsFNDLOADable Objects Printer StylesPrinter Styles Lookups Lookups Descriptive Flexfields with all of specific Contexts Descriptive Flexfields with all of specific Contexts Key Flexfield Structures Key Flexfield Structures Concurrent Programs Concurrent Programs Value Sets Value Sets Value Sets with values Value Sets with values Profile Options Profile Options Request Groups Request Groups Request Sets Request Sets Responsibilities Responsibilities Menus Menus
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
77
Using FNDLOADUsing FNDLOAD
Call from UNIX command lineCall from UNIX command line
FNDLOAD apps/pwd 0 Y mode configfile datafile FNDLOAD apps/pwd 0 Y mode configfile datafile entity [ param ...]entity [ param ...]
< 0 Y > - < 0 Y > - Concurrent program flagsConcurrent program flags
Mode - Mode - UPLOAD or DOWNLOAD. UPLOAD UPLOAD or DOWNLOAD. UPLOAD causes the datafile to be uploaded to causes the datafile to be uploaded to thedatabase. DOWNLOAD causes the loader to thedatabase. DOWNLOAD causes the loader to fetch rows and write them to the datafile.fetch rows and write them to the datafile.
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
88
Using FNDLOADUsing FNDLOAD
FNDLOAD apps/pwd 0 Y mode configfile datafile entity [ param ...]FNDLOAD apps/pwd 0 Y mode configfile datafile entity [ param ...]
con g le - con g le - The configuration file to use (usually with a suffix of .lct)The configuration file to use (usually with a suffix of .lct)
data le - data le - The data file to write (usually with a suffix of .ldt, but not The data file to write (usually with a suffix of .ldt, but not enforced or supplied by the loader). If the data file already exists, it enforced or supplied by the loader). If the data file already exists, it will be overwritten.will be overwritten.
entity - entity - The entity to upload or download. The entity to upload or download.
[param] - [param] - Zero or more additional parameters. Each parameter is in Zero or more additional parameters. Each parameter is in the form NAME=VALUE. the form NAME=VALUE.
Metalink note 274667.1 lists command line to download all object typesMetalink note 274667.1 lists command line to download all object types
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
99
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1010
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1111
FNDLOAD apps/xxx 0 Y \FNDLOAD apps/xxx 0 Y \DOWNLOAD \ (mode)DOWNLOAD \ (mode)$FND_TOP/patch/115/import/afcpprog.lct \ (configfile)$FND_TOP/patch/115/import/afcpprog.lct \ (configfile)FNDLOAD_TST.ldt \ (datafile)FNDLOAD_TST.ldt \ (datafile)PROGRAM \ (entity)PROGRAM \ (entity)APPLICATION_SHORT_NAME="XXFI" \ (parameters)APPLICATION_SHORT_NAME="XXFI" \ (parameters)CONCURRENT_PROGRAM_NAME="FNDLOAD_TST“CONCURRENT_PROGRAM_NAME="FNDLOAD_TST“
Different input .lct file and parameters depending on Different input .lct file and parameters depending on what you want to downloadwhat you want to download
FNDLOAD download exampleFNDLOAD download example
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1212
FNDLOAD OutputFNDLOAD Output
Downloading PROGRAM to the data file Downloading PROGRAM to the data file FNDLOAD_TST.ldtFNDLOAD_TST.ldt
Downloaded EXECUTABLE FNDLOAD_TST XXFIDownloaded EXECUTABLE FNDLOAD_TST XXFIDownloaded VALUE_SET 10 CharactersDownloaded VALUE_SET 10 CharactersDownloaded DESC_FLEX XXFI $SRS$.FNDLOAD_TSTDownloaded DESC_FLEX XXFI $SRS$.FNDLOAD_TSTDownloaded PROGRAM FNDLOAD_TST XXFIDownloaded PROGRAM FNDLOAD_TST XXFI
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1313
.ldt File.ldt File Section 1 – Entity DefinitionsSection 1 – Entity Definitions
# -- Begin Entity Definitions -- # -- Begin Entity Definitions --
DEFINE PROGRAMDEFINE PROGRAM KEY CONCURRENT_PROGRAM_NAME VARCHAR2(30)KEY CONCURRENT_PROGRAM_NAME VARCHAR2(30) KEY APPLICATION_SHORT_NAME VARCHAR2(50)KEY APPLICATION_SHORT_NAME VARCHAR2(50) CTX OWNER VARCHAR2(4000)CTX OWNER VARCHAR2(4000) BASE LAST_UPDATE_DATE VARCHAR2(75)BASE LAST_UPDATE_DATE VARCHAR2(75) TRANS USER_CONCURRENT_PROGRAM_NAME VARCHAR2(240)TRANS USER_CONCURRENT_PROGRAM_NAME VARCHAR2(240) BASE EXEC REFERENCES EXECUTABLEBASE EXEC REFERENCES EXECUTABLE BASE EXECUTION_METHOD_CODE VARCHAR2(1)BASE EXECUTION_METHOD_CODE VARCHAR2(1) BASE ARGUMENT_METHOD_CODE VARCHAR2(1)BASE ARGUMENT_METHOD_CODE VARCHAR2(1) BASE QUEUE_CONTROL_FLAG VARCHAR2(1)BASE QUEUE_CONTROL_FLAG VARCHAR2(1)……
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1414
Section 2 - Data DefinitionsSection 2 - Data Definitions
BEGIN EXECUTABLE "FNDLOAD_TST" "XXFI"BEGIN EXECUTABLE "FNDLOAD_TST" "XXFI"
OWNER = "JEFFSLAVITZ"OWNER = "JEFFSLAVITZ"
LAST_UPDATE_DATE = "2006/12/04"LAST_UPDATE_DATE = "2006/12/04"
EXECUTION_METHOD_CODE = "Q"EXECUTION_METHOD_CODE = "Q"
EXECUTION_FILE_NAME = "fndload_tst"EXECUTION_FILE_NAME = "fndload_tst"
USER_EXECUTABLE_NAME = "FNDLOAD TEST"USER_EXECUTABLE_NAME = "FNDLOAD TEST"
DESCRIPTION = "Test concurrent program to demonstrate use of DESCRIPTION = "Test concurrent program to demonstrate use of FNDLOAD"FNDLOAD"
END EXECUTABLEEND EXECUTABLE
……
Modify .ldt file as desired to create new entityModify .ldt file as desired to create new entity
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1515
FNDLOAD upload exampleFNDLOAD upload example
FNDLOAD apps/xxx 0 Y \FNDLOAD apps/xxx 0 Y \
UPLOAD \ (mode)UPLOAD \ (mode)
$FND_TOP/patch/115/import/afcpprog.lct \ (configfile)$FND_TOP/patch/115/import/afcpprog.lct \ (configfile)
FNDLOAD_TST.ldt \ (datafile)FNDLOAD_TST.ldt \ (datafile)
PROGRAM \ (entity)PROGRAM \ (entity)
APPLICATION_SHORT_NAME="XXFI" \ (parameters)APPLICATION_SHORT_NAME="XXFI" \ (parameters)
CONCURRENT_PROGRAM_NAME="FNDLOAD_TST“CONCURRENT_PROGRAM_NAME="FNDLOAD_TST“
Same format as Download command except specify Same format as Download command except specify UPLOAD.UPLOAD.
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1616
FNDLOAD SummaryFNDLOAD Summary
Migrate objects between instances from Test to Migrate objects between instances from Test to Prod or from one version of Apps to anotherProd or from one version of Apps to another
Create new objects based on existing objectsCreate new objects based on existing objects Automate further by writing a wrapper Automate further by writing a wrapper
concurrent programconcurrent program For more information see:For more information see:
System Administrator’s Guide – Configuration, System Administrator’s Guide – Configuration, Appendix B Appendix B
Metalink note Metalink note 274667.1274667.1
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1717
FNDLOADFNDLOAD
Questions???Questions???
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1818
Reasons to Edit Context FilesReasons to Edit Context Files
After cloning usually need to modify Apps and After cloning usually need to modify Apps and RDBMS context filesRDBMS context files
Oracle’s cloning scripts make Oracle’s cloning scripts make mostmost but not but not allall necessary changes to context file variables necessary changes to context file variables (javamailer_reply_to, ecx_log_dir ..)(javamailer_reply_to, ecx_log_dir ..)
May want to set some context file variables set May want to set some context file variables set to custom value (e.g. ifile locations)to custom value (e.g. ifile locations)
Test instance might need to be smaller than Test instance might need to be smaller than Production (dbcache_size, db_processes)Production (dbcache_size, db_processes)
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
1919
Customizing Context FilesCustomizing Context Files
How do you customize RDBMS and How do you customize RDBMS and Applications context files?Applications context files?
Manual edits are time consuming and Manual edits are time consuming and error proneerror prone
Ideal solution is UNIX script Ideal solution is UNIX script SED is one answer!SED is one answer!
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2020
How sed worksHow sed works
Reads line of inputReads line of input Searches for a pattern using regular Searches for a pattern using regular
expressionexpression Replace text with vi-like syntaxReplace text with vi-like syntax
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2121
Sed ExampleSed Example
From the RDBMS context file after cloningFrom the RDBMS context file after cloning<dbprocesses oa_var="s_db_processes">1300</dbprocesses><dbprocesses oa_var="s_db_processes">1300</dbprocesses>
What you want in your non-Prod instanceWhat you want in your non-Prod instance<<dbprocesses oa_var="s_db_processes">200</dbprocesses>dbprocesses oa_var="s_db_processes">200</dbprocesses>
How sed worksHow sed works Search for the line containing s_db_processesSearch for the line containing s_db_processes Replace the value between > .. < with a new Replace the value between > .. < with a new
valuevalue Write the new line to an output fileWrite the new line to an output file
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2222
BEFORE:BEFORE:<dbprocesses oa_var="s_db_processes">1300</dbprocesses><dbprocesses oa_var="s_db_processes">1300</dbprocesses>
AFTER:AFTER:<dbprocesses oa_var="s_db_processes">200</dbprocesses><dbprocesses oa_var="s_db_processes">200</dbprocesses>
s/s/\(\"s_db_processes\">\).*\(<\)\(\"s_db_processes\">\).*\(<\)//\1200\2\1200\2//
HUH????HUH????
Scary at first but it’s just a vi command:Scary at first but it’s just a vi command:s/s/ search string search string // replacement string replacement string //
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2323
BEFORE:BEFORE:
<dbprocesses <dbprocesses oa_var="s_db_processes">1300</dbprocesses>oa_var="s_db_processes">1300</dbprocesses>
s/s/\(\"s_db_processes\">\)\(\"s_db_processes\">\).*\(<\).*\(<\)//\1200\2\1200\2//
Search string:Search string:
\( \"s_db_processes\"> \)\( \"s_db_processes\"> \) pattern #1pattern #1
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2424
BEFORE:BEFORE:
<dbprocesses <dbprocesses oa_var="s_db_processes">1300</dbprocesses>oa_var="s_db_processes">1300</dbprocesses>
s/s/\(\"s_db_processes\">\)\(\"s_db_processes\">\).*.*\(<\)\(<\)//\1200\2\1200\2//
Search string:Search string:
pattern #1 PLUSpattern #1 PLUS
.*.* one or more charactersone or more characters
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2525
BEFORE:BEFORE:<dbprocesses <dbprocesses
oa_var="s_db_processes">1300</dbprocesses>oa_var="s_db_processes">1300</dbprocesses>
s/s/\(\"s_db_processes\">\).*\(\"s_db_processes\">\).*\(<\)\(<\)//\1200\2\1200\2//
Search string:Search string:substring #1 PLUS one or more substring #1 PLUS one or more characters PLUScharacters PLUS\( < \)\( < \) pattern #2pattern #2
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2626
BEFORE:BEFORE:
<dbprocesses oa_var="s_db_processes">1300</dbprocesses><dbprocesses oa_var="s_db_processes">1300</dbprocesses>
s/s/\(\"s_db_processes\">\).*\(<\)\(\"s_db_processes\">\).*\(<\)//\1200\2\1200\2//
Replacement string:Replacement string:
\1 200 \2\1 200 \2
pattern #1 + 200 + pattern #2pattern #1 + 200 + pattern #2
AFTER:AFTER:
<dbprocesses oa_var="s_db_processes">200</dbprocesses><dbprocesses oa_var="s_db_processes">200</dbprocesses>
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2727
Use with environment variables tooUse with environment variables too
BEFORE:BEFORE:<temp_dir oa_var="s_temp">/apps51/test/common/temp</temp_dir><temp_dir oa_var="s_temp">/apps51/test/common/temp</temp_dir>
SED command:SED command:
s:\(\"s_temp\">\).*\(<\):\1/apps02/tmp/${DBNAME}\2:s:\(\"s_temp\">\).*\(<\):\1/apps02/tmp/${DBNAME}\2:
AFTER:AFTER:<temp_dir oa_var="s_temp">/apps02/tmp/test</temp_dir><temp_dir oa_var="s_temp">/apps02/tmp/test</temp_dir>
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2828
Sed ScriptsSed Scripts
Refer to Supplemental file on Refer to Supplemental file on NorCalOAUG websiteNorCalOAUG website
Edit RDBMS context fileEdit RDBMS context file rdbms_editctx.shrdbms_editctx.sh
Edit applications context fileEdit applications context file apps_editctx.shapps_editctx.sh
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
2929
Customizing Context Files with Customizing Context Files with SEDSED
Questions?Questions?
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3030
Workflow HousekeepingWorkflow Housekeeping
Completed workflow data remains in Completed workflow data remains in databasedatabase
May want to retain for some period for May want to retain for some period for workflow problem researchworkflow problem research
Need to purge old workflow data with Need to purge old workflow data with concurrent program “Purge Obsolete concurrent program “Purge Obsolete Workflow Runtime Data”Workflow Runtime Data”
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3131
Purgeable WorfkflowsPurgeable Worfkflows
Parent workflow is complete AND Parent workflow is complete AND all children workflows of parent workflow all children workflows of parent workflow are completeare complete
Running “Purge Obsolete Workflow Running “Purge Obsolete Workflow Runtime Data” purges all related workflow Runtime Data” purges all related workflow and notification data for parent and childand notification data for parent and child
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3232
Unpurgeable Workflow DataUnpurgeable Workflow Data
Active workflows waiting on a notification Active workflows waiting on a notification response, no matter how oldresponse, no matter how old
Completed workflows which have an Completed workflows which have an active child workflowsactive child workflows
Some workflows that end in errorSome workflows that end in error Unpurgeable workflow data remains in Unpurgeable workflow data remains in
your database forever!your database forever!
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3333
Periodically review two categories of Periodically review two categories of active workflows:active workflows:
Workflows started in the last 3-6 monthsWorkflows started in the last 3-6 months• Is the workflow legitimately still active?Is the workflow legitimately still active?• Is there an error in the workflow?Is there an error in the workflow?• What is causing the workflow not to complete?What is causing the workflow not to complete?
Workflows started six months or longer agoWorkflows started six months or longer ago• These will probably never completeThese will probably never complete• Research neededResearch needed• What is causing workflow to not complete?What is causing workflow to not complete?
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3434
Researching Old Active WorkflowsResearching Old Active Workflows
Start by looking in WF_ITEMSStart by looking in WF_ITEMS Begin_Date = date workflow startedBegin_Date = date workflow started End_DateEnd_Date
Not Null = date workflow endedNot Null = date workflow ended Null = workflow is still activeNull = workflow is still active
Look at item types that have lots of old Look at item types that have lots of old active workflows to get low hanging fruitactive workflows to get low hanging fruit
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3535
SELECT item_type, SELECT item_type,
MIN(begin_date),MIN(begin_date),
MAX(begin_date),MAX(begin_date),
COUNT(*)COUNT(*)
FROM wf_itemsFROM wf_items
WHERE end_date IS NULLWHERE end_date IS NULL
AND begin_date < SYSDATE - 180AND begin_date < SYSDATE - 180
GROUP by item_typeGROUP by item_type
HAVING count(*) > 1000;HAVING count(*) > 1000;
High Count Old Active WorkflowsHigh Count Old Active Workflows
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3636
ITEM_TYP MIN_BEGIN MAX_BEGIN COUNTITEM_TYP MIN_BEGIN MAX_BEGIN COUNT
-------- --------- --------- ---------------- --------- --------- --------
HRSSA 29-NOV-05 09-JUN-06 1,260HRSSA 29-NOV-05 09-JUN-06 1,260
HXCEMP 04-OCT-04 05-JUN-06 5,335HXCEMP 04-OCT-04 05-JUN-06 5,335
JTFTASK 23-MAR-04 08-JUN-06 1,601JTFTASK 23-MAR-04 08-JUN-06 1,601
OEOH 02-OCT-01 02-JUN-06 2,220OEOH 02-OCT-01 02-JUN-06 2,220
OEOL 02-OCT-01 02-JUN-06 4,887OEOL 02-OCT-01 02-JUN-06 4,887
PACRMUPD 15-DEC-05 09-JUN-06 1,505PACRMUPD 15-DEC-05 09-JUN-06 1,505
WFERROR 05-NOV-01 09-JUN-06 7,806WFERROR 05-NOV-01 09-JUN-06 7,806
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3737
Researching Old Active WorkflowsResearching Old Active Workflows
Once you know the offending item types, Once you know the offending item types, find out what is wrongfind out what is wrong
Workflow Status Monitor is a good toolWorkflow Status Monitor is a good tool Use a SQL script – my example, Use a SQL script – my example,
WF_SNAPSHOT.sql (in Supplemental file WF_SNAPSHOT.sql (in Supplemental file on Nor Cal OAUG website)on Nor Cal OAUG website)
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3838
Workflow Status MonitorWorkflow Status Monitor
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
3939
Activity HistoryActivity History
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4040
Status DiagramStatus Diagram
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4141
Status Monitor Detail ScreenStatus Monitor Detail ScreenWorkflow DetailsWorkflow Details
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4242
WF_SNAPSHOT.sqlWF_SNAPSHOT.sqlOLD ACTIVE workflows (WF started > 6 mos ago)OLD ACTIVE workflows (WF started > 6 mos ago)These are waiting for an activity to complete.These are waiting for an activity to complete.
ITEM_TYP MIN_BEGIN MAX_BEGIN COUNT ITEM_TYP MIN_BEGIN MAX_BEGIN COUNT -------- --------- --------- -------- -------- --------- --------- -------- APEXP 04-OCT-04 09-JUN-06 371 APEXP 04-OCT-04 09-JUN-06 371 APWRECPT 14-DEC-05 16-JAN-06 3 APWRECPT 14-DEC-05 16-JAN-06 3 HRSSA 29-NOV-05 09-JUN-06 1,260 HRSSA 29-NOV-05 09-JUN-06 1,260 HXCEMP 04-OCT-04 05-JUN-06 5,335 HXCEMP 04-OCT-04 05-JUN-06 5,335 JTFTASK 23-MAR-04 08-JUN-06 1,601 JTFTASK 23-MAR-04 08-JUN-06 1,601 OEOH 02-OCT-01 02-JUN-06 2,220 OEOH 02-OCT-01 02-JUN-06 2,220 OEOL 02-OCT-01 02-JUN-06 4,887 OEOL 02-OCT-01 02-JUN-06 4,887 PACRMUPD 15-DEC-05 09-JUN-06 1,505 PACRMUPD 15-DEC-05 09-JUN-06 1,505
SERVEREQ 10-OCT-05 06-JAN-06 408SERVEREQ 10-OCT-05 06-JAN-06 408 WFERROR 05-NOV-01 09-JUN-06 7,806 WFERROR 05-NOV-01 09-JUN-06 7,806
Code in Supplemental File on NorCalOAUG websiteCode in Supplemental File on NorCalOAUG website
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4343
Aborting WorkflowsAborting Workflows
Use Workflow Manager for aborting Use Workflow Manager for aborting individual workflows or all workflows of a individual workflows or all workflows of a particular item typeparticular item type
Or write your own SQL script and use Or write your own SQL script and use WF_ENGINE.AbortProcess APIWF_ENGINE.AbortProcess API
Afterwards run concurrent program Purge Afterwards run concurrent program Purge Obsolete Workflow Runtime Data to Obsolete Workflow Runtime Data to remove workflow data from databaseremove workflow data from database
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4444
Workflow ManagerWorkflow Manager
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4545
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4646
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4747
AbortProcess APIAbortProcess API
procedure AbortProcess (itemtype in varchar2,
itemkey in varchar2,
process in varchar2 default ’’,
result in varchar2 default eng_force);
Aborts process execution and cancels outstanding notifications.
Any outstanding notifications or sub-processes are set to a status of COMPLETE.
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4848
Use Sql Plus to abort one workflow:Use Sql Plus to abort one workflow:exec WF_ENGINE.ABORTPROCESS(exec WF_ENGINE.ABORTPROCESS(
‘‘WFERROR’, -- Item typeWFERROR’, -- Item type‘‘WF1620’); -- Item keyWF1620’); -- Item key
Write a PL/SQL program to abort a range Write a PL/SQL program to abort a range of workflows. See ABORT_WF.sql in of workflows. See ABORT_WF.sql in Supplemental file for an example of how to Supplemental file for an example of how to do this.do this.
AbortProcess APIAbortProcess API
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
4949
Workflow Housekeeping SummaryWorkflow Housekeeping Summary
Schedule ‘Purge Obsolete Workflow Schedule ‘Purge Obsolete Workflow Runtime Data’ to run on a regular basisRuntime Data’ to run on a regular basis
Periodically check for extremely old active Periodically check for extremely old active workflowsworkflows
Use SQL and Workflow Status Monitor to Use SQL and Workflow Status Monitor to research why these workflows are not research why these workflows are not completingcompleting
Use SQL or Workflow Manager to abort Use SQL or Workflow Manager to abort these workflowsthese workflows
2007 Training Day v1.22007 Training Day v1.2 Tools for the Oracle Applications Tools for the Oracle Applications DBA ToolboxDBA Toolbox
5050
Questions?Questions?
Jeff SlavitzJeff Slavitz
(415) 388 – 3003(415) 388 – 3003
[email protected]@OracleAppsPro.Com