demantradiagnostictools-1655694
TRANSCRIPT
-
8/10/2019 demantradiagnostictools-1655694
1/35
Demantra Diagnostic Tools
VCP PMO
Feb 2012
-
8/10/2019 demantradiagnostictools-1655694
2/35
2009 Oracle CorporationProprietary and Confidential 2
Agenda
This presentation summarizes some of the key diagnostic toolsthat can be utilized when dealing with various Demantra errorsand problems.
Focus on the following areas:
Installation Data model
Data loading (EP_Load and Integration Interfaces)
DB deadlocks and internal errors
Web Application troubleshooting:
Application memory errors WS performance
Engine errors
-
8/10/2019 demantradiagnostictools-1655694
3/35
2009 Oracle CorporationProprietary and Confidential 3
Installation
The installer includes a configurable log file that can trace the
install process.
The installer needs to be configured(first panel of the installer),otherwise no log will be written at all (in the past by default thelog was written to the $temp$ directorythis is not the case any
more).
When having installation errors there are few traces that can beanalyzed:
Installer log
Screenshots of the selections in the different Installer panels.
Review db_audit_log table for object changes made by theupgrade
DB_Exception_Log table
-
8/10/2019 demantradiagnostictools-1655694
4/35
2009 Oracle CorporationProprietary and Confidential 4
Data Model:
When having data model errors there are few traces that can beanalyzed:
An Exportof the Data model
Review db_audit_log table for object changes made by theupgrade.
LOG_DATA_MODEL table (an automatic LOG_IT log).
-
8/10/2019 demantradiagnostictools-1655694
5/35
2009 Oracle CorporationProprietary and Confidential 5
Data Loading:
Data loading includes 2 aspectsEp_Load stored procedures andIntegration Interface.
Each one of them can be monitored both for tracking errors as wellas tracking performance problems.
-
8/10/2019 demantradiagnostictools-1655694
6/35
2009 Oracle CorporationProprietary and Confidential 6
Data LoadingEp_Load:
Ep_load Errors:
Enable LOG_ITprocess on relevant Demantra storedprocedures as defined in LOG_IT_PARAMS table
DB_Exception_Log.
Ep_Load performance: Count of data from the staging tables.
DB_Params tableEp_Load performance related parameters Execute Call_DM_Build_Procedures after changing
parallelization parameters in DB_Params
DB HW definitions.
System Memory Disk IO and CPU Utilization monitoring- Eithersystem performance monitor or Linux top events
AWR /ADDM reports.
-
8/10/2019 demantradiagnostictools-1655694
7/35 2009 Oracle CorporationProprietary and Confidential 7
Data LoadingIntegration:
Integration Errors: Collaborator & Integration log (Enable sql logging: appserver.sql,
appserver.update.sql)
Concurrent request logs (collaborator.login.user)
apscheck.sql (Note: 246150.1)
Integration Performance:
Count of data from the staging tables.
APS_ParamsIntegration Interface related parameters
DB HW definitions. system memory disk IO and CPU utilization monitoring- either
system performance monitor or Linux top events.
AWR /ADDM reports.
-
8/10/2019 demantradiagnostictools-1655694
8/35 2009 Oracle CorporationProprietary and Confidential 8
DB deadlock/ internal database error:
Collaborator Log Database \udump logs (USER_DUMP_DEST specifies the pathname
for a directory where the DB server will write debugging trace files onbehalf of a user process.)
Enable LOG_IT process on selected Demantra storedprocedures as defined in LOG_IT_Params table.
-
8/10/2019 demantradiagnostictools-1655694
9/35 2009 Oracle CorporationProprietary and Confidential 9
Web Application troubleshooting:
Demantra Web application includes 2 components: Application ServerDemantra Web application deployment
inside a Web server.
ClientUser side browser and resources (CPU, Memory)running SUN Java Plug-in.
They are connected by a Network (LAN, WAN).
For better troubleshooting we need to understandwhere we have a problem is it on the Server side/Client side / Both ?
-
8/10/2019 demantradiagnostictools-1655694
10/35
2009 Oracle CorporationProprietary and Confidential 10
Application out of memory errors:
Identify where the problem is by using logs: Collaborator logserver side log.
Plug-in logClient side log.
Server side issues: Heap dump from the webserver
Thread dump from the Webserver (in case of application freeze orslow down)
Application server memory configuration (-Xmx)
Count of Level members (need level member caching?)
Client side issues: Heap dump from the Java plug-in.
Thread dump from the Java plug-in
Plug-in memory configuration (-Xmx)
-
8/10/2019 demantradiagnostictools-1655694
11/35
2009 Oracle CorporationProprietary and Confidential 11
WS performance and errors: Identify where the problem is:
Server sideAWR /ADDM reports, DB side CPU and Memory.
Application server CPU and configuration, APS_PARAMS relevantparameters.
Client side - CPU utilization (and for how long).
Server side issues: Demantra Index Advisor report.
Thread dump (in case of application freeze or slow down).
System Memory Disk IO and CPU Utilization monitoring- eithersystem performance monitor or Linux top events.
DB HW definitions.
Number of concurrent users at the time (concurrent user log).
Client side issues: Plug-inXmx setting
WS wizard panels screen shots.
Client side logIf requested (Number of combinations in the WS).
-
8/10/2019 demantradiagnostictools-1655694
12/35
2009 Oracle CorporationProprietary and Confidential 12
Engine errors:
Always provide a full Engine log (manager and engine) with
relevant logging option.
DB errors: Engine log with Sql loggingdepends on where the DB error is Engine
manager or engine2k.
Processor error: Engine log with DebugPro logging groups 100/110.
Engine Out of memory errors:
No of Tasks
Count of Active Combinations (Select Count(1) from MDP_Matrix whereprediction_status = 1).
-
8/10/2019 demantradiagnostictools-1655694
13/35
2009 Oracle CorporationProprietary and Confidential 13
Engine errors cont:
Engine not running: On LinuxApplication server log
Engine performance: AWR report
Check whether CPU Hyper threading enabled on Engine serversDisable if
its enabled Engine Blades/Server + DB HW definitions.
DB/Engine Blades Memory Disk IO and CPU Utilization Monitoring - Eithersystem performance monitor or Linux top events.
For more information check Oracle Support note 800030.1Demantra Engine Troubleshooting Presentation (April 6th
2011).
-
8/10/2019 demantradiagnostictools-1655694
14/35
2009 Oracle CorporationProprietary and Confidential 14
Appedix
Configure auditing capabilities for BM configurationchanges:
Client expression Evaluator
-
8/10/2019 demantradiagnostictools-1655694
15/35
-
8/10/2019 demantradiagnostictools-1655694
16/35
-
8/10/2019 demantradiagnostictools-1655694
17/35
2009 Oracle CorporationProprietary and Confidential 17
Client expression Evaluator:
Can be used for troubleshooting client expressions that did notpass verification in the BM
Supported from 7.3 Version and above only.
-
8/10/2019 demantradiagnostictools-1655694
18/35
2009 Oracle CorporationProprietary and Confidential 18
Client expression Evaluator:
New filecreated
-
8/10/2019 demantradiagnostictools-1655694
19/35
2009 Oracle CorporationProprietary and Confidential 19
Client expression Evaluator:
SQL Parser Statement For computed_name'perc_trade_spend' :
SELECT 0 as total_plan_spend, 0 as ttl_plan_spend_ex_slot,0 as total_event_dollars, CAST(SYSTIMESTAMP as DATE) assdate From Dual
Evaluating Client Expression
Non Translated expression before evaluate:
if(isnull(( Evt Spend exS / Ttl Evt Values )),0, ( Evt Spend exS /Ttl Evt Value ) )
Translated expression for evaluate:
if(isnull((ttl_plan_spend_ex_slot/ttlevtvalues)),0,(ttl_plan_spend_ex_slot/total_event_dollars))
Invalid Client Expression
-
8/10/2019 demantradiagnostictools-1655694
20/35
2009 Oracle CorporationProprietary and Confidential 20
Key Oracle Demantra Support Notes/Web Cast
Materials Information Center: Oracle Demantra Demand Management (Doc ID 1381213.2)
Information Center: Oracle Value Chain Planning Demantra (Doc ID 1157065.1)
Oracle Demantra Documentation Library (Doc ID 443969.1) Demantra Development Suggested Performance Advice plus Refernece doc (Doc ID 1157173.1)
Trouble Shooting the Demantra Worksheet Performance 7.3.0.1 and Beyond! UPDATED! (Doc ID:470852.1)
Demantra Development Suggested Performance Advice Plus Reference Docs (Doc ID: 1157173.1)
Rebuild_Schema procedure - One of the Keys to Improved Demantra performance (Doc ID: 860576.1)
Troubleshooting EBS - DEMANTRA : User Synchronization does not work (Doc ID: 602530.1)
Step by Step Troubleshooting of the Silent Installer (Doc ID: 947322.1) Additional Configurations needed when Running Demantra on Oracle 11g Databases (Doc ID:
1064995.1)
ORA-24247 During Shipment and Booking collections (Doc ID 1070104.1)
How to Analyze Demantra Forecast Engine Performance (Processing Time) Issues / DemantraEngine is Slow (Doc ID 863025.1)
Improving Demantra Engine Performance of Resetting Previous Forecast For InactiveCombinations (Doc ID 1270690.1)
How to check Demantra Performance. Troubleshooting. Database. Maintenance. Parameters.Java. Worksheet. Engine (Doc ID 1356886.1)
Web Cast Materials (Doc ID: 800030.1)
Worksheet Design & Best Practices
Demantra Post Production Support Common Issues, Troubleshooting Tips, and MaintainingYour Instance
Demantra Engine Troubleshooting
-
8/10/2019 demantradiagnostictools-1655694
21/35
2009 Oracle CorporationProprietary and Confidential 21
-
8/10/2019 demantradiagnostictools-1655694
22/35
2009 Oracle CorporationProprietary and Confidential 22
Reviewing an AWR
Introduction
Introduced in Oracle 10g
Similar to a Statspack report used in prior versions
Runs as a background process
Takes snapshot of statistics and SQLs every hour.
You can manually take AWR snapshots for any operation (before and after).
-
8/10/2019 demantradiagnostictools-1655694
23/35
2009 Oracle CorporationProprietary and Confidential 23
Reviewing an AWRImportant report sections
Report has a DB overview section Lists the Top 5 waitsImportant for troubleshooting performance bottlenecks
DB File type waitsPhysical IO related
Buffer type waitsLogical IO related
Log Type waitsRedo log related
PXParallel query related
GCGlobal Cache related in a RAC environment
Longest wait times can be used for troubleshooting
Watch for DB sequential read related waits as these are single threaded reads of indexes
-
8/10/2019 demantradiagnostictools-1655694
24/35
2009 Oracle CorporationProprietary and Confidential 24
Reviewing an AWRSQL related sections
SQL Time Model statistics are important for SQL tuning
Total Elapsed TimeIncludes all IO waits
Total CPU timeType of joins (which depend on PK, Index usage) Total Buffer GetsLogical IO
Total Disk readsPhysical IO
Total ExecutionsIndicates SQL executions and size of worksheet
Total Parse callsSQL, Bind variable issues
For better performance, you want DB CPU time to be high compared to the total SQL processing time
Time may be spent in parsing and IO, reducing these would typically be the primary focus of the tuningexercise, which indicate IO issues
Efficiencies listed are typically close to 100%, with decent memory settings
-
8/10/2019 demantradiagnostictools-1655694
25/35
2009 Oracle CorporationProprietary and Confidential 25
Reviewing an AWR
Verify Memory Settings
PGA_Aggregate_Target SGA_Target, SGA_MAX_SIZE
Efficiencies listed are typically close to 100%, with decent memory settings
Buffer Pool statistics (default, 16k) show, how efficiently buffer cache is being used - Canbe used for sizing
Low Hits indicate relevant memory settings need to be increased
-
8/10/2019 demantradiagnostictools-1655694
26/35
2009 Oracle CorporationProprietary and Confidential 26
Configure Installer log:
Configure log
-
8/10/2019 demantradiagnostictools-1655694
27/35
2009 Oracle CorporationProprietary and Confidential 27
Exporting a Data model
Export
-
8/10/2019 demantradiagnostictools-1655694
28/35
2009 Oracle CorporationProprietary and Confidential 28
LOG_IT:
LOG_IT is a logging mechanism for Demantra PL/SQL databaseprocedure code. It is analogous to log4j in Java.
LOG_IT can be used to trace a procedure flow, show variablevalues, and record performance timing without having to run adebugger.
LOG_IT is only available for a limited number of procedures (likeCHAINING , PROPORT,SIMULATION and more) but the list
keeps growing.
The available procedures are listed in the LOG_IT_PARAMS table.
-
8/10/2019 demantradiagnostictools-1655694
29/35
2009 Oracle CorporationProprietary and Confidential 29
LOG_IT (cont):
How to use LOG_IT:
The customer / support can enable the logging and the contentsof the log table.
Some important points to remember: It uses a sequential key to write logs so you know exactly the order of the log.
Each main procedure writes to one log table. ie PROPORT writes to theLOG_PROPORT table.
Sub procedures can be set up to write to the same log table.
INSERT_UNITS and DYN_INSERT_UNITS_BRANCH_ID both write toLOG_INSERT_UNITS.
Log tables are usually overwritting each run (truncated).
Logging is enabled by setting the LOGGING_LEVEL to be greater than 0 fora specific procedure in the LOG_IT_PARAMS table.
-
8/10/2019 demantradiagnostictools-1655694
30/35
2009 Oracle CorporationProprietary and Confidential 30
LOG_IT (cont):
Logging levels:
0 = No logging
1 = Procedure and sub procedure 'start' and 'end' logs. (SP,EP)
2 = Procedure progress markers (labels) (M)
3 = Procedure data , values held in specific variables (D) (alsotemp procedures and tables are not dropped)
4 = Sub Procedure progress markers (labels) (M)
5 = Sub Procedure data , values held in specific variables (D)
6 = Procedure Data, values from with in loops (L)
7 = Sub procedure progress markers inside loops (M) 8 = Sub procedure data from inside loops (L)
-
8/10/2019 demantradiagnostictools-1655694
31/35
2009 Oracle CorporationProprietary and Confidential 31
LOG_IT (cont):
-
8/10/2019 demantradiagnostictools-1655694
32/35
2009 Oracle CorporationProprietary and Confidential 32
LOG_IT (cont):
The logging is enabled by setting the LOGGING_LEVEL above 0for a specific procedure in the LOG_IT_PARAMS table. Whenyou commit the change to LOG_IT_PARAMS a trigger re-writesand compiles the procedure LOG_IT which then contains a list ofprocedures that it will process.
Note: before 7.3.1.1 -Only one LOG_IT_PARAMS row should bechanged between each commit because of the way the triggerworks.
Note- LOG_IT has some performance impact on the procedures itlogs, it should not be used at a normal production mode (all loglevels should be 0 for runtime operations).
-
8/10/2019 demantradiagnostictools-1655694
33/35
2009 Oracle CorporationProprietary and Confidential 33
Enabling client side logs:
Traditionally, client side logs are configured via the
clientLogConf.lcf file.
Some Drawbacks: User would have to restart the client (logout/login) in order for changes to
take effect.
All clients which would be connected to that specific Demantra server wouldbe exposed to the same level of verbosity.
From 7.3.0, the Client Log Categories Editor was introduced toenable client side logging for a specific client session.
The Client Log Categories Editor loads the ClientLogConf.lcfupon the initialization of the PartnerApplet.
The editor dialog receives the properties object as parameter todisplay all the log categories listed currently in the configurationfile.
-
8/10/2019 demantradiagnostictools-1655694
34/35
2009 Oracle CorporationProprietary and Confidential 34
Enabling client side logs (cont):
-
8/10/2019 demantradiagnostictools-1655694
35/35
Enabling client side logs (cont):
To activate the Editor user needs to log to the WS applet
(Partner) and press the CTRL+ALT+Lbutton combination in themain application screen.
If a WS is open in the Applet click on the 'Open' button to select aworksheet and close the "Open Worksheet" dialog without choosing anyworksheet.
After that press the CTRL+ALT+L.
The editor has 4 buttons which are I18N ready: Apply- sets the selected Log categories to the selected Log Levels and
close the dialog
Cancel- closes the dialog without doing anything Undo Changes- resets the state of selections in the dialog to the
last saved state
Config file Settings- resets all the selections in the Dialog to
the original settings of the configuration file