Siebel SQL log

This article explains how Siebel generates the underlying SQL that has resulted from configuration in Siebel Tools. This is useful information in diagnosing SQL performance problems.

You can spool the SQL to a file using dedicated client by including the /s switch in your dedicated client link. However, I advise that it is better to just view the siebel dedicated client log file as the siebel log file will contain not only the SQL spool but also the Event Context and other useful information as to what Siebel is doing. You need to ensure that the SIEBEL_LOG_EVENTS environment variable is set to 4 on your local machine to get this information.

In the Siebel log file, the following text will precede the SQL spool associated with a business component:

Begin: Execute SqlObj '[bc_name]'

Where [bc_name] = The name of the business component

There can exist multiple SQL statements associated with instantiating a business component. The first SQL statement is the main core SQL query to instantiate the business component. Then any additional SQL statements exist associated to multi value links that have not got the Use Primary Join set. Also additional SQL statements are generated through calculated fields that perform counts on multi value fields.

The main SQL statement is generated based on the configuration of the business component as such:

1. The primary table of the business component will be listed last in the FROM clause. For example, the Action business component would have the S_EVT_ACT table as the last table in the FROM clause.

2. Any fields exposed through the UI will be included in the SQL. If the field is a join, then the join will automatically be included in the SQL. If the field is a MVF where the MVL uses primary join then the join will be included in the SQL.

3. Any fields that have Force Active = Y, Immediate Post Changes = Y or Link Specification = Y or Required = Y will be included in the SQL even if these fields are not rendered through the UI.

4. Any calculated fields that use InvokeServiceMethod to invoke a business service would result in additional SQL statements for any queries that are performed within the business service called.

5. The search specification of the business component will be incorporated into the WHERE clause of the SQL statement. If the user performs a a query through the UI then this would be applied to the SQL WHERE clause also.

6. The sort specification of the business component will be included in the SQL in the ORDER BY clause.

7. The business component view mode will be incorporated into the SQL depending on the view mode applied.

8. Siebel Tools does not always show all joins used by a business component - these are vanilla joins. For example the Contact BC, when the SQL is spooled this shows joins to S_CONTACT_SS and S_CONTACT_BU which are not configured in Siebel Tools but exist by default associated to the Contact BC.

9. For any joins configured in Siebel Tools, if the Outer Join Flag = Y then the join will be shown in the SQL spool as an outer join. The join will be shown as an inner join if the Outer Join Flag != Y.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值