Thursday 15 August 2013

Log and Sql trace in MWA



The mwa.LogLevel can have the following values:

-          Fatal, Error, Warning, Debug, and Trace.
-          Trace is the least restrictive: it will log all messages. 
-          Fatal is the most restrictive: it will display only messages from fatal errors.
-          Trace is the setting normally suggested when debugging a problem on mobile.

How to set up mwa trace:

To enable logging you set "mwa.LogLevel = TRACE" in the mwa.cfg file then restart the mobile server.

Steps:

1.       Cd $MWA_TOP/secure
2.       Change the below mentioned entries in mwa.cfg:


Change mwa.LogLevel=TRACE

3.       Restart the MWA server.
4.       Perform the transaction.
5.       [port].INV.log
[port].system.log  are the logs which will capture the transaction logs in the below mentioned location:



Reference: Metalink: Doc ID 338291.1

How to setup sql trace file for MWA:

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.

Steps:

1.       Cd $MWA_TOP/secure
2.       Change the below mentioned entries in mwa.cfg:



Change mwa.LogLevel=performance


3.       Restart the MWA 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.

Reference Metalink Doc ID 277655.1

No comments:

Post a Comment