cancel
Showing results for 
Search instead for 
Did you mean: 

SAPCL Having more than one DB2 use the same trace directory.

Former Member
0 Kudos

Hello,

Looking at the DBACOCKPIT SAP Collector settings panel, we have all of the DB2 subsystems that run in a given LPAR use the same trace directory. (HFS path of trace directory.)

In our case, that directory is /usr/sap/saposcol/traces. This means that we have trace files called db2cl* from all of our alert routers running on an LPAR in the same directory. It is a little confusing, but we can handle it. The question I have is that there is a cmds.alr file in that same directory. The contents of that file seem to change occasionally. At times throughout the day, the file seems to be contain information related to the five alert routers using that trace directory. Is it OK for the contents of this file to change?

Another question I have is related to the sapcl file that is in this directory. The timestamp on this file seems to change periodically. Sometimes the file size changes. Note 958252, the SAPCL FAQ says "The trace directory is required to save errors or trace files and to start the alert router. To start the alert router, the system loads the executable SAPCL from the database, saves it temporarily in the trace directory and starts it in USS."

With 5 alert routers, sharing the same trace directory, you could end up with 5 sapcl executables that get changed around based on what a particular alert router needs.

Would it be better to point each alert router to a different trace directory?

Thanks,

Ron Foster

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the information.

Db2Dirk
Advisor
Advisor
0 Kudos

Hello,

There are two configuration parameters in transaction DBACOCKPIT -> u201CSAP Collector Settingsu201D to determine the SAPCL directories.

HFS path of collector:

This is the directory, where the files u201CDBRM.db2cldbu201D and u201Csapdb2clu201D are located. The two files are used during installation of SAPCL and u201Ccopiedu201D into two targets:

A) Linked into DB2 Load library to be used as the stored procedure SAPCL.

B) Stored into a database table to be used as Alert Router.

This directory is accessed during installation only. Not during runtime.

HFS path of trace directory:

This is the directory, where trace files are stored of the stored procedure SAPCL and the Alert Router. In addition, this is used during startup of the Alert Router. Startup of the Alert Router is done by the following steps:

1. Unload the Alert Router executable out of the database table into the file u201Csapclu201D.

2. Creating the Alert Router parameter file u201Ccmds.alru201D. E.g. it contains the SSID.

3. The executable sapcl is started and the name of the Alert Router parameter file is used as the input parameter of sapcl to determine the behavior. E g. /u/sapr3/s12run/trace/sapcl /u/sapr3/s12run/trace/cmds.alr

To keep the input parameters files separate for each SSID, it is recommended to have a trace directory for each SSID. It is also recommended to have a trace directory for each DB2 member of a data sharing group. However, this is just a recommendation. Every time, an Alert Router is stared, the files u201Csapclu201D and u201Ccmds.alru201D are recreated and overwrite the existing files. After startup of the Alert Router, the two files are no more used.

In the case, where you are using different patch levels or versions of SAPCL and you are using the same trace directory for all SSIDs, it is very likely, that you see different sizes of the file u201Csapclu201D. This is because different patch levels or versions of SAPCL have different sizes and you always see the file size of the most recent stared Alert Router.

In case, that two Alert Routers are stared at the exactly same time, it could end up in problems.

Here is an example of the contents of cmds.alr of a two way data sharing group with the SSIDs SGC1 and SGC2 with a shred directory /u/sapr3/jotrun:

ssid=SGC1 sqlid=SAPJOT planname=CSAPCL FKTID=13 ACE=0 DBTRACE=0 TRACE=0 TRCDIR=/u/sapr3/jotrun/traceSGC1 GUID=4D0685A211780174E10080000A11C971

ssid=SGC2 sqlid=SAPJOT planname=CSAPCL FKTID=13 ACE=0 DBTRACE=0 TRACE=0 TRCDIR=/u/sapr3/jotrun/traceSCG2 GUID=4D0685C411780174E10080000A11C971

You can see, that almost all parameters are the same, except u201Cssidu201D and u201CTRCDIRu201D. TRCDIR come from the SAP Collector Settings parameter u201CHFS path of trace directoryu201D. Please note that there is not slash between u201Ctraceu201D and u201CSGCu201D. The directory name is u201CtraceSGC1u201D and u201CtraceSGC2u201D.

Regards

Dirk

Dirk Nakott, IBM, DBACOCKPIT development

Former Member
0 Kudos

Hi Dirk,

Can you tell me when starting and running the alert router which Id should I use.

is it UC<SID> or UC<SID>I ??

Regards,

Ravi.