How PM Compass Writes SQL Logs and SQL Exceptions

The table below shows the conditions under which PM Compass writes logs for SQL and SQL exceptions.

SQLLogging

SQLLogDirectory Value

Will Write SQL Logs?

Will Write SQL Exceptions?

Y

Folder not specified or folder does not exist

No

No

N

Valid folder path entered

No

Yes

Y

Valid folder path entered

Yes

Yes

N

Folder not specified or folder does not exist

No

No

Log Format

SQL logging generates a file format [UserID]_[SessionID].log.

Log Format for Query Without Exception (One Line Per SQL Execution)

[Time Started] [SQL Query] [Elapsed Time] [Number of records returned/Affected records]

Sample Log Content

2019-11-21T17:05:04.888 SELECT CostSystem FROM CAM_SystemSettings  0.001  1

Log Format for Queries with Exception (One Line Per SQL Execution)

[Time Started] [SQL Query] [Elapsed Time] ERR:[Exception Error] [Call Stack]

Sample Log Content

2018-11-21T17:05:04.888    SELECT CostSystem FROM CAM_SystemSettings ERR: ORA-00001: unique constraint (PMC81COB82CU5ORAUPG.CAM_ITEMUPDATESTATUSPK) violated    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck) at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()   at Deltek.Framework.Ancestors.Server.ParameterizedCommand.ExecuteCommand(Object[] parameterValues) in C:\Development\FrameworkDotNet\production\46PMC81\VB\Server\Ancestors\ParameterizedCommand.vb:line 155


Learn more about...