This section includes the following topics:
The Interpoint for Siebel extension of Precise for SQL Server and Precise for Oracle can only receive notifications of user events if specific objects are included in the Siebel Repository File (SRF). Before you can use Interpoint for Siebel, you need to modify the SRF file. This document describes how to add the required objects to the file.
For Siebel batch processes to be sampled by the Siebel AppTier Collectors, you need to create a tab-delimited text file that contains the mapping of each Siebel server to its host machine and network address. Each row in the file represents a physical machine. The first field in each row should represent the name of the Siebel server, the second field its corresponding host machine name, and the third its network address.
If you have installed Interpoint for a SQL Server database, perform the following procedures.
To create the text file
<Precise_root>\products\sql-server\<instance_ name>\etc\siebel_machines.txt
To obtain the list of Siebel servers
list servers
To obtain the host machine name and network address
cscript //nologo getAddress.vbs ODBC data source
Administrator user name Administrator passwords
Following is an example for the content of the siebel_machines.txt file:
sieb1 APPSRV1 00096B26E66C
sieb2 APPSRV2 00096B26E67C
Once the Siebel AppTier Collectors are installed, modify the Siebel Repository File (SRF), so that Interpoint for Siebel will be able to receive notifications of Siebel-related user events.
Part of the .srf file, is a collection of callback scripts, which are triggered by various events in a user's session. A user can view or change these scripts using the Siebel Tools.
If you have installed Interpoint for Siebel for a SQL Server database, modifying the SRF consists of the following tasks:
The following procedure creates the VERITAS Interpoint project. All objects created in the procedures following on this procedure will be grouped under this project.
To create the Interpoint project
The following procedure creates a table in the DBMS.
To create the CX_VTSSPID table
The following procedure creates the VTS_SPID business component.
To create the business component
The following procedure creates the VTS_SPID business object.
To create the business object
The following procedure adds the Application_PreNavigate() function.
To add the Application_PreNavigate() function
Function Application_PreNavigate (DestViewName As String, DestBusObjName As String) As Integer
Dim cmd As String
Dim oActionBO As BusObject
Dim vtsBC As BusComp
Dim spid As String
Const appName = "Siebel Sales Enterprise"
On Error Resume Next Set oActionBO = theApplication.GetBusObject("VTS_SPID") Set vtsBC = oActionBO.GetBusComp("VTS_SPID")
With vtsBC
ClearToQuery
ActivateField "Row Id"
ExecuteQuery ForwardOnly
FirstRecord
i = .GetFieldValue("Row Id")
End With
Set oActionBO = Nothing
Set vtsBC = Nothing
cmd = "vrts_srf_agent.exe " + i + " """ + appName + """ """ + DestViewName + """ """ + DestBusObjName + """ """ + LoginName + """"
Shell(cmd)
Application_PreNavigate = ContinueOperation
End Function
function Application_PreNavigate (DestViewName, DestBusObjName)
{
try
{
var cmd;
var oActionBO;
var vtsBC;
var appName = "Siebel Sales Enterprise";
oActionBO = TheApplication().GetBusObject("VTS_SPID");
vtsBC = oActionBO.GetBusComp("VTS_SPID");
vtsBC.ClearToQuery();
vtsBC.ActivateField("Row Id");
vtsBC.ExecuteQuery(ForwardOnly);
vtsBC.FirstRecord();
cmd = "start cmd /c vrts_srf_agent.exe " +
vtsBC.GetFieldValue("Row Id") +//SPID
" \"" + appName +
"\" \"" + DestViewName +
"\" \"" + DestBusObjName +
"\"\"" + TheApplication().LoginName() +
"\"";
vtsBC = null;
oActionBO = null;
Clib.system(cmd);
}
catch (obj)
{
Clib.system( "start cmd /c vrts_srf_agent.exe \"" + obj + "\"" );
return (ContinueOperation); //Ignore all exceptions
}
}
The following procedure replaces the table with a custom view. To replace the table with a custom view
DROP TABLE CX_VTSSPID
GO
CREATE VIEW [CX_VTSSPID] as select
'1' as [CONFLICT_ID],
getdate() as [CREATED],
'--' as [CREATED_BY],
getdate() as [LAST_UPD],
'2' as [LAST_UPD_BY],
1 as [MODIFICATION_NUM],
@@spid as [ROW_ID]
GO
GRANT SELECT ON [CX_VTSSPID] TO public
GO
The following procedure completes the modification.
To complete the modification
The following procedure debugs the script.
To debug the script
For Siebel batch processes to be sampled by the Interpoint for Siebel Collectors, create a tab-delimited text file that contains the mapping of each Siebel server to its host machine, as it appears in Oracle.
To create the text file:
<Precise_root>\products\oracle\<SID>\etc\siebel_machines.txt
<Precise_root>/products/oracle/<SID>/etc/siebel_machines.txt
To obtain the list of Siebel servers:
list servers
The following list is an example of the results:
Table 1 List of Siebel servers
SBLSRVR_NAME | HOST_NAME |
---|---|
AsDev1 | POOL-SIEBEL1 |
AsDev2 | POOL-SIEBEL2 |
Each returned row represents a Siebel server. The row information can be split into two columns:
SBLSRVR_NAME
represents the name of the Siebel server, for example AsDev1
.HOST_NAME
represents the corresponding physical machine name, but not necessary as it appears in Oracle.To find the physical machine name as it appears in Oracle, connect to the Siebel database and execute the following command:
SELECT DISTINCT MACHINE FROM V$SESSION;
The following list is an example of the results:
Table 2 Machine name list
MACHINE |
---|
PRECISE\POOL-SIEBEL1 |
PRECISE\POOL-SIEBEL2 |
If there is no entry in V$SESSION
with the physical machine name, use the results from the HOST_NAME
column. After inserting the previous results into the siebel_machines.txt
file, the contents is as follows:
AsDev1 PRECISE\POOL-SIEBEL1
AsDev2 PRECISE\POOL-SIEBEL2
Once the Siebel AppTier Collectors are installed, modify the Siebel Repository File (SRF), so that Interpoint for Siebel will be able to receive notifications of Siebel-related user events.
Part of the .srf file, is a collection of callback scripts, which are triggered by various events in a user's session. A user can view or change these scripts using the Siebel Tools.
If you have installed Interpoint for an Oracle database, modifying the SRF consists of the following tasks:
Lock the project, by choosing the Locked column to the right option.
All objects created in subsequent steps will be grouped under this project. |
This procedure applies to versions up to version 8.0 and version 8.0 and higher. For steps where there are differences between versions, the difference has been clearly specified. |
Add two new columns to the table as follows:
Table 3 Table with new columns
Name | User Name | Physical Type | Length |
---|---|---|---|
CLIENT_INFO | Client Info | Varchar | 64 |
ACTION | Action | Varchar | 32 |
In the Server Script Editor, select the Application_PreNavigate function. The function's default script appears in the text panel.
Figure 8 Siebel Repository - Application [Siebel Sales Enterprise] - Script Dialog Box
If this function already contains a custom script, do not continue. Contact Precise Technical Support for alternative instructions. |
If the used Scripting Language is eScript, use the following script:
Modify the appName variable to match the name of the Siebel application. |
Function Application_PreNavigate (DestViewName, DestBusObjName)
{
try
{
var oActionBO;
var pssBC;
var appName = "Siebel Sales Enterprise";
var action; //(32)
var client_info; //(64)
oActionBO =
TheApplication().GetBusObject("PRECISE_SBL");
pssBC = oActionBO.GetBusComp("PRECISE_SBL");
action = DestViewName.substring(0,32);
client_info="S," +
TheApplication().LoginName().substring(0,14) + "," +
DestBusObjName.substring(0,31) + "," +
appName.substring(0,17);
pssBC.NewRecord(1);
pssBC.SetFieldValue("Action", action);
pssBC.SetFieldValue("Client Info", client_info);
pssBC.WriteRecord();
pssBC = null;
oActionBO = null;
}
catch (obj)
{
pssBC = null;
oActionBO = null;
var sText = obj.errText;
var nCode = obj.errCode;
}
finally
{
return (ContinueOperation);
}
}
If the used Scripting Language is Visual Basic, use the following script:
Modify the appName variable to match the name of the Siebel application. |
Function Application_PreNavigate (DestViewName As String, DestBusObjName As String) As Integer
Dim oActionBO As BusObject
Dim pssBC As BusComp
Dim action As String
Dim client_info As String
Const appName = "Siebel Field Service"
On Error Resume Next
Set oActionBO = TheApplication.GetBusObject("PRECISE_SBL")
Set pssBC = oActionBO.GetBusComp("PRECISE_SBL")
action = Left(DestViewName,32)
client_info="S," + Left(LoginName,14) + "," + Left(DestBusObjName,31) + "," + Left(appName,17)
pssBC.NewRecord 1
pssBC.SetFieldValue "Action", action
pssBC.SetFieldValue "Client Info", client_info
pssBC.WriteRecord
Set oActionBO = Nothing
Set pssBC = Nothing
Application_PreNavigate = ContinueOperation
End Function
Compile the project.
create table CX_PSS_SBL_TAB as select * from CX_PSS_SBL where 1=2;
DROP TABLE CX_PSS_SBL;
GRANT SELECT, INSERT, UPDATE, DELETE ON CX_PSS_SBL_TAB to SSE_ROLE;
create view CX_PSS_SBL as
Select * from CX_PSS_SBL_TAB;
GRANT SELECT, INSERT, UPDATE, DELETE ON CX_PSS_SBL TO SSE_ROLE;
CREATE OR REPLACE TRIGGER CX_PSS_SBL_TRG
INSTEAD OF INSERT on CX_PSS_SBL
BEGIN
DBMS_APPLICATION_INFO.SET_CLIENT_INFO (:new.client_info); DBMS_APPLICATION_INFO.SET_ACTION (:new.action);
END;
/