Thursday 1 November 2012

Siebel: Object manager paramater configuration



The Siebel Object Manager is a multithreaded process, which means that one running process can execute multiple, concurrent threads. When an Object Manager is started on a Siebel server, an OM task will automatically be started (with status 'Handling Requests'). When users start to log in, each user login will spawn a new task. These user tasks will remain active until the user logs out. All these tasks will be counted towards the value of the MaxTasks parameter.

Multiple OM processes can be run on each Siebel Server. This multiprocessing and multithreaded programming model provides Siebel software with a very high degree of scalability, as users are constrained only by application server resources in the numbers of processes and threads that can be run to support very high numbers of concurrent users.

Processes and threads are programming terms for things running at the operating system level. At the Siebel Server level, more user-friendly terms are used to express the same concepts. The term Multithreaded Server, or MT Server, refers to an OM process, and the term Server Task refers to a user session being executed by a thread of that process.

As with any high performance system, proper tuning is required to assure optimal operation. The goal is to tune the SOM to efficiently use the database connections, memory, and CPU time while not succumbing to high levels of context switching. There are many parameters to consider when tuning a Siebel OM. Siebel Expert Services provides a Production Readiness review, to make sure that the Siebel application has been tuned correctly. The following case study will provide concepts and examples to educate the Siebel Administrator in tuning their Siebel eBusiness Application.

The first step to consider is the projected number of concurrent users for the Siebel application. In this case study, there are 1000 concurrent users, assuming an average think time of 30 seconds between user operations. The think time is the idle time when the server or the client is not doing anything; it does not include query time. During the think time, the user may be conversing on the telephone, working in another application (such as email) or doing some other task. Using the Server Manager command line utility, srvrmgr, the Siebel Administrator can run the "list statistics" command to calculate the "Average Think Time" for a process. This information is used to calculate the first set of parameters.

    MaxTasks = concurrent users + anonymous user pool   [1000+100]
    MaxMTServers = MaxTasks / 100   [1100/100 = 11]
    Number of Sessions per SISNAPI Connection = 20

Observations:
For environments where there is lack of machine resource, such as lack of memory, it is recommended a lower MaxTasks / MaxMTServer ratio. It is necessary to make tests to tune it and find a proper value. But the ratio in these scenarios can go from around 25 to 75.
For Object Managers that use Product Configurator, the recommended MaxTasks / MaxMTServer ratio is 25. The same 25 ratio is recommended for eCommunications Object Manager.

Max Tasks
Maximum number of tasks represents the maximum number of concurrent user sessions that can run on a server at one time. An MT Server is equivalent to a single process of an Object Manager. Each MT Server is implemented as an operating system process; it has its own memory space and processor identifier (PID). The default value is 20.
NOTE: For Siebel Servers running on the Solaris platform: When using the Oracle 8i client, setting a high ratio of tasks per OM process may cause the object manager to end unexpectedly. For additional information and workarounds for this behavior, review "Alert 881: Intermittent "Login Failed" Error Running Siebel Server on Solaris with Oracle 8i Database"
Note: There are limits on per process memory utilization set up at Siebel level & OS level.
If you have high number of tasks per process then this might cause problem.

Max MT Servers and Min MT Servers
Maximum MT Servers is the maximum number of MT Servers that can be run for this component on this server. It is also used to calculate how many tasks can be run on each MT Server. Minimum MT Servers determines how many MT Servers start initially when the Siebel Server starts. It also determines the minimum number of MT Servers to run on a Siebel Server, in the event many users log out. The loading of a new MT Server into memory is CPU-intensive, and users may experience a short delay in logging into the Siebel application. In order to prevent this delay, Siebel Administrators may set the Minimum MT Servers parameter equal to the Maximum MT Servers parameter. However, some Siebel Administrators may configure Minimum MT Servers to be lower than the Maximum MT Servers to tune the Siebel application for the normal usage load, while allowing the potential for spikes in user load. Siebel Systems generally recommends that customers set the Minimum MT Servers parameter equal to the Maximum MT Servers parameter for most deployments.

The ratio MaxTasks / MaxMTServers is equal to the Max Number of Tasks running in one instance of a MT Server. When the number of running tasks exceeds the number of tasks that can be supported by the running MT Servers, a new MT Server will be started. Siebel Systems recommends administrators to begin tuning with a ratio of 100:1, assuming an average 30 second think time. If the average user think time is 15 seconds, then the ratio is 50:1 (50% of 100:1). If the average user think time is 60 seconds, then the ratio is 200:1 (200% of 100:1). This will give Siebel Administrators an initial benchmark of performance. Customizations and usage of the Siebel application will dictate whether to increase or decrease these ratios.

Saturday 4 August 2012

Siebel Remote Diagnostic Agent


When you open any SR with Oracle they expect certain inputs from you which generally includes following files.

  •      Crash Files
  •      Log files
  •      FDR files
  •      Core files 
  •      Crash.txt

RDA i.e. Remote Diagnostic Agent  can be of great use to provide all the required information to Oracle experts at one go. RDA is a less known tool developed in house by Oracle engineers to collect the necessary information about your environment and issue.

Steps to setup RDA in your environment:

1) Download RDA 4.25 from support web. This is .zip file.

https://support.oracle.com/epmos/faces/ui/km/DocumentDisplay.jspx?_afrLoop=30118533417024&id=314422.1&_afrWindowMode=0&_adf.ctrl-state=8uhmykn99_123

Unzip RDA under the SIEBEL_ROOT/siebsrvr directory of the server where you had the crash. This will create directory rda under location  SIEBEL_ROOT/siebsrvr

You can refer Doc ID 314422.1 for more details.

2) Download a copy of the solgrabcore.zip file from below location.

https://support.oracle.com/epmos/downloadattachmentprocessor?attachid=477520.1:SGCzip
Now place solgrabcore.sh under the SIEBEL_ROOT/siebsrvr/bin directory.

3) Run the following command from the SIEBEL_ROOT/siebsrvr/rda directory and provide the appropriate input values:

./rda.sh -vT siebel

Note: Please note that all RDA commands and options are case sensitive.

When you run above command it will ask you for following details:

Siebel Server Home (same as SIEBEL_ROOT above)
Application Enterprise Name
Application Server Name
Advanced collection enabled –  (Select Yes)
Process Identifier
Core File location – (please verify the directory location of the core file. ensure the entire path including the core file name is provided for this value)

4) As output, zip file will be be created in rda/output directory which will contain all the details. Attach the final RDA*.zip file to the SR. The format of the file will be similar to RDA.RDA_<machine-name>.zip.

This is very handy tool and can save your lot of time that you generally waste in providing inputs to Oracle.

Steps to generate log files for Siebel Tools/Dedicated/Mobile Client

Here are the simple steps to generate Log Files for Siebel Tools and mobile/Dedicated Client.
1. Right Click on "My Computer" and select Properties.
 

2. Select the Advanced tab and open the Environmental Variables window.
 

3. Under User Variables section, create two Environmental Variables as per following :

  
a) Variable = SIEBEL_LOG_DIR, Value = C:\LOG
   b) Variable =
SIEBEL_LOG_EVENTS, Value = ALL

4. Click on Ok.
 

5. Create a Folder with name "LOG" in "C" drive. This is the folder, where all the logs gets generated.
 

6. Done.

Now restart the Siebel Tools/Mobile/Dedicated client and you will see a "Siebel.log" gets created under C:\LOG folder, which will help you in troubleshooting issues

Siebel Apply and Activate


All of us know, when we do any schema level changes then we have to do Apply & Activate. This post will help you to understand what exactly happens when we do Apply and Activate. 

The Apply and Activate buttons appear in the Table and Index sections of Siebel Tools. They are a means to synchronize the logical and physical schema and also to alert other users that changes have been made to the schema.
The logical schema is stored in the S_TABLE, S_COLUMN, S_INDEX and S_INDEX_COLUMN tables in the Siebel database. The physical schema is defined in the RDBMS (IBM DB2, Microsoft SQL Server or Oracle) that is being used.
Developer does the changes in logical schema i.e. in repository. In order to those changes to be propagated to physical schema two things must happen,

1)     Siebel tools must create DDL statement corresponding to repository level change and fire that sql to the  database.This is exactly what happens when we click Apply button.
2)     Next step is to press activate button. When you click activate button, Schema version information stored in table S_APP_VER changes.

All Siebel components gets information about physical schema from diccache.dat file which resides in siebel server bin directory. This file also contains information about schema version.
Every Siebel component compares schema version information in diccache.dat file with schema information in S_APP_VER table before using schema definitions in deccache.dat file.
So in case you have any new changes and if you have Applied and Activated those changes using Siebel tools, schema version information in S_APP_VER table and dicache.dat will not match and Siebel will recreate diccache.dat file. Newly created diccache.dat file will have latest schema changes. So every time you do any change in logical schema (Repository) you have to perform Apply & Activate. 

Saturday 28 July 2012

Server Busy Error in SIEBEL



"Server you are trying to access is either busy or experiencing difficulties” 
Undoubtedly, for any Siebel admin this is the most common issue to troubleshoot. In this post I will try to list down most possible reasons causing this issue.
1)      Issue with Database
Check database connectivity by using database client like sqlplus/plsql developer/Toad

2)      Issue with Data source name i.e. DSN
Siebel connects to database using DSN so check
In UNIX:
       Setup environment variables, go to bin directory & run below command
       odbcsql /u sie_app /p ******** /s siebsrvr_CMS
       Where,
       /u - database user
       /p-  database password
       /s-   Datasource Name
       If this is not working then you have to check .odbc.ini file.
       especially driver name & TNS service name (Same service name must be present in tnsnames.ora file)
If above command errors out then check following environment variables
echo $ORACLE_HOME
echo $LD_LIBRARY_PATH
          echo $TNS_ADMIN
           In Windows:
           Use ODBC datasource administrator -> System DSN -> Double click on Data source ->Test     
           connect
3)      Issue with database account
Make sure you can access database with following accounts
1)      Anon user : In case of DB authentication
2)      SADMIN/LDAP USER: In case of LDAP or SSO Authentication (assuming you use SADMIN/LDAP USER as common login to connect to database )
3)      Check anon user and SADMIN/LDAP user is present in S_USER table.
select  * from S_USER where login like ‘SADMIN’
select  * from S_USER where login like ‘ANONUSR’
4)      Check Siebel services
           Ps –ef | grep sieb
           ps –ef | grep siebsvc

           Check Siebel server & Gateway is running.
           list_ns
           list_server all

5)      Check SC broker & AOM status
set server siebapp

list comp scbroker show CC_ALIAS, CP_DISP_RUN_STATE
list comp SSEObjMgr_enu show CC_ALIAS, CP_DISP_RUN_STATE

list tasks for comp SSEObjMgr_enu show TK_TASKID, TK_DISP_RUNSTATE, TK_LABEL
list tasks for comp scbroker show TK_TASKID, TK_DISP_RUNSTATE, TK_LABEL

6)      Check port 2321 of application server

telnet tsgsq2902 :2321 (from web server)
netstat  -an | grep 2321 (from application server)

7)      Check core services are running

cd  $MWHOME/bin
./mwadm status

Or check status of process regss , watchdog ,mwrpcss etc   

8)      Check data source definition
srvrmgr:siebapp> List param DSConnectString for named subsystem ServerDataSrc show PA_ALIAS, PA_VALUE

9)      Check CPU/Memory/Mount space  utilization

df -hk
top –n 0
prstat –a 5 5
10)    Try using vanilla Siebel.srf file
11)    Try using backu[ copy of siebns.dat file
13)   Check lbconfig.txt file & eapps.cfg to make sure requests are reaching to SCbroker

a)      lbconfig.txt location specified correctly in eapps.cfg under communication management section
b)      virtual host value must be set to true
c)       server connect strings must be given properly in lbconfig.txt file
d)      object manager connect string in eapps.cfg must contain value Virtual host
                  

14)   Check application server log files, WEB instance log, SWSE logs, SSO agent logs
15)   If it is newly installed environment then check environment by using EVT

16)   Make sure that all the mounts including File system are available.

17)   Restart Application Server
delete .osdf  file make sure that  .shm file is getting deleted after stopping server, if not, delete it manually.
18)   Take web server bounce
19)   Take clean bounce to recreate .svc file

20)   Verify messages in /var/adm/messages

21)   Physical host reboot
This should be the last resort, if nothing else works. Server reboot will open clogging of ports and will restart all the OS processes.


Friday 27 July 2012

Siebel Packager


Hello Friends,
Sometime back I got chance to create mobile client packager. In this post I will explain procedure of creation of packager, in next few days I will also write separate article on Siebel anywhere.

What is packager?
The Siebel Packager utility allows the Siebel administrator to assemble the Siebel client executable program and other installed files, including your custom configuration, into a customized installation package that is tailored to your needs. Siebel Packager packages installations for Siebel Mobile or Dedicated Web Client. 

You can access/download the document from below link.

Sunday 15 July 2012

Siebel 8.2.2 Installation Changes


Hi Friends,

Recently I got chance to install Siebel 8.2.2, most of the installation steps are similar to 8.1.x with few interesting differences. I am going to pinpoint those differences in this post.

1)  It supports windows 64 bit
2)  ImageCreator.exe is no more available for creation of installation image. You have to use snic.bat
3) You have to run setup.bat(Windows) or ./runinstaller(Unix/Linux) to invoke installer
4)  It uses OUI (Oracle universal installer wizard) for installation.
     One of the advantages of OUI is that it supports cloning
5) Configuration tool will not be invoked automatically after installation, you have  
     to invoke it explicitly.
6)  To prevent session hijacking, session IDs in cookies are encrypted using key given in epps.cfg
7)  8.2.2 license keys are not available on licensecodes.oracle.com.
     8.1 all inclusive keys will work just fine with Public Sector 8.2.2