Siebel System Monitoring and Diagnostics Guide > Monitoring Siebel Server Run-Time Operations >

About Using SQL Tagging to Trace Long-Running Queries in Siebel Business Applications


The SQL tagging feature in Siebel Business Applications provides administrators with the ability to trace the origin of long-running or slow-performing SQL statements (queries) back to a specific task and user who triggered it. This topic describes the SQL tagging feature and syntax. It also provides sample code.

After SQL tagging is enabled, tagging information is added to the Siebel Application Object Manager (AOM)-generated SELECT statements. When a poor performing SQL statement is suspected, the database administrator can use this tagging information at the database level to trace which component task and user initiated the SQL without the need to reboot any Siebel Server or components. Database administrators can then find the component task log file for more in-depth analysis of the performance issue. For information about enabling SQL tagging, see Enabling and Disabling SQL Tagging.

NOTE:  Other SQL statements generated by Siebel Application Object Manager, such as INSERT, UPDATE, and DELETE are not tagged. The SQL tagging feature is available for Siebel CRM version 8.1.1.1 and later, and Siebel CRM version 8.2.

SQL Tagging Format

SQL tagging information is formatted as a comma-separated list of values using the following syntax:

<componentname>,<servername>,<taskid>,<userid>,<flowid:sarmid>,<busobjname>,
<buscompname>,<viewname>

where:

    • componentname is the alias of the component, for example, SCCObjMgr_enu.
    • servername is the name of the Siebel Server on which the component or task is running.
    • taskid is the task ID of the user who generated the query.
    • userid is the login name of the user who generated the query.
    • flowid is the flow ID of the component or task.
    • sarmid is the SARM ID of the component or task.
    • busobjname is the business object name.
    • buscompname is the business component name.
    • viewname is the view name (only in UI mode).

NOTE:  Any optional elements of a tag that are irrelevant or missing for the query are replaced with an empty string.

Sample SQL-Tagged Code

The following is a sample of how a tagged SQL statement might appear in a log file when the SQL statement was generated from a Siebel Call Center (SCCObjMgr_enu AOM) component and an Oracle database. The changes made by the SQL tagging feature appear in italics.

SELECT

FIRST_NAME,
LAST_NAME,
...,
:1

FROM

TBO.S_CONTACT
...

WHERE

LAST_NAME LIKE:2

ORDER BY

...

Bind variable 1: SCCObjMgr_enu,sdchs20i046,10485776,SADMIN,00000089489108a8:50557,Account,Account,
Account List View
Bind variable 2: Foo*

For information about enabling SQL tagging, see Enabling and Disabling SQL Tagging. For information about setting log levels for SQL tagging, see Setting Log Levels for SQL Tagging.

Siebel System Monitoring and Diagnostics Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.