SQL*Trace with WMS-MWA: Mobile Applications (Tracing SQL Via Database Trace To Allow For TKPROF Of Results Of User Actions) [ID 277655.1]


mwa.cfg INV.log WMS.log system.log
Goal
How does one find a list of the SQL commands run during a mobile user session?
-OR-

How to enable SQL*Trace on the MWA server for mobile applications like WMS (Warehouse Management System) and MSCA (Mobile Supply Chain Applications).

Solution
SQL*Trace of WMS / MSCA
In addition to the options noted in the Oracle Mobile Supply Chain Applications (MSCA) Server manual, users can enable SQL*Trace via the log level option. This will be described in more detail below.

How It Works
If the user sets the parameter mwa.LogLevel = performance in configuration file (mwa.cfg), the mobile application will write a SQL*Trace file for all users connecting to the mobile server. All user connections will be written to the same SQL*Trace file usually found in the server side UDUMP directory in the same location as the other trace files.

SQL*Trace vs. MSCA Log Files
The following steps will enable SQL*Trace for all MSCA/WMS users. Note that with this setting is NOT the same as using the "Trace" option described in more detail below. Therefore, the user may need to run the steps with mwa.LogLevel=performance to get the SQL*Trace, and then run the steps again with mwa.LogLevel=trace to get additional log file information in the SYSTEM.log, INV.log and WMS.log.

Steps
1. Go to $MWA_TOP/secure directory. 

2. In the file mwa.cfg , set mwa.LogLevel=performance.

3. Restart the mobile server.

4. Perform the related navigation steps to cause the issue.

5. You can search in the trace directories for files created. Or you can try to locate the particular file using SQL like the following to help. Query to identify the trace file name with the corresponding number from the username.


select prs.spid
from v$session ses , v$process prs
where ses.program = 'JDBC Thin Client'
and ses.client_info is not null
and ses.osuser = '&OS_USER_NAME'
and ses.paddr = prs.addr
order by ses.logon_time desc ;


6. Use the column "prs.spid" which maps to the filename in udump location. For example, if the column has the value 18027, then the file name could be  "ora_18027.trc".

7. Create a TKPROF file and upload both the raw trace (.trc) and TKPROF.

8. After generating the trace file, ensure that you disable SQL*Trace by stopping the mobile server, resetting the parameter in mwa.cfg, and restarting the mobile server.

Other Trace Values
The most common option for logging details of an MSCA / WMS session is to use the log level of Trace.  See Note.338291.1 for more details or refer to the Oracle Mobile Supply Chain Applications (MSCA) Server: Administration Guide.

References
NOTE:277558.1 - Oracle Mobile Applications (MSCA) Allows Receiving Of Closed PO Lines
NOTE:338291.1 - Howto Enable WMS / MSCA Logging?


No comments:

Post a Comment

There was an error in this gadget