Importing LOVs Using EIM
Although EIM itself is not workspace-aware, LOVs are. As described in Using Siebel Tools, the way LOVs work in workspaces differs between the design repository (development environment) and the runtime repository. Consequently, for each time you load LOVs using EIM, you must manually structure the LOV data to respect the workspace framework and to be consistent with the documented requirements. In particular, note the following:
-
In a design repository (DR), each LOV exists in every integration workspace. For this reason, EIM creates or updates an LOV in all instances of the LOV across all integration workspaces, not just a single workspace. The original LOV record is active, but all of the copies of this record are inactive, until the integration branches that contain them have been delivered into parent workspaces or MAIN.
-
In a runtime repository (RR), any existing instance of the LOV must remain intact while EIM resets the values of the WS_MIN_VER and WS_MAX_VER columns. A newly imported version gets an appropriate WS_MIN_VER value and a WS_MAX_VER value of 10000. To simplify this process and to isolate users from having to understanding the specific details, the following are provided:
-
A stored procedure named LOV_EIM_LOAD, which is automatically created in all environments by the PostInstallDBSetup process. This stored procedure works on all supported database platforms: PostInstallDBSetup detects the correct database-specific version to create.
-
A specialized EIM interface batch file (IFB) named LOV.ifb, which calls the stored procedure as needed.
The LOV.ifb file manages the creation of LOVs across all integration workspaces in the development environment and creates the correct values for WS_MIN_VER and WS_MAX_VER in runtime environments.
-
When you import LOVs using EIM, you do so by leveraging the LOV.ifb file provided by Oracle,
which references the LOV_EIM_LOAD stored procedure. LOV.ifb is provided in the
SIEBSRVR_ROOT/admin
directory. This file controls the
creation of the original LOV record and also the creation of the LOV record copies in all
other integration workspaces.
LOV.ifb File Contents
The structure of the LOV.ifb file is as follows:
[Siebel Interface Manager]
USER NAME = "$TABLE_OWNER"
PASSWORD = "********"
PROCESS = Import LOV
$SCRATCH_BATCH = 999999 ; Used for temporary processing, such as additional rows for adding copies to each IWS
$BATCH = 1000 ; The source batch number where the records have been staged in the EIM table
$INT_BATCH = 0 ; The intermediate batch to update the PAR_ROW_ID in base table
$TARGET_REPOSITORY = 'Siebel Repository' ; The target Repository Name
$TARGET_WORKSPACE = 'MAIN'; The target Workspace Name. This can be any IWS in DR, but *must* be 'MAIN' in RR environments
$WS_INACTIVE_FLG = 'Y' ; Used for making the LOVs active or inactve in IWS
;Batch 0 is fixed for Intermediate batch because a job can not run without batch and we can not use the source batch number as it is already used by pre process
;Session SQL for Oracle, DB2390 AND DB2UDB
;SESSION SQL="CALL $TABLE_OWNER.LOV_EIM_LOAD($TARGET_WORKSPACE,$TARGET_REPOSITORY,'PRE',$BATCH,$SCRATCH_BATCH,$WS_INACTIVE_FLG)"
;Session SQL for MSSQL
;SESSION SQL="exec $TABLE_OWNER.LOV_EIM_LOAD @AS_WS_NAME=$TARGET_WORKSPACE,@AS_REPOSITORY_NAME=$TARGET_REPOSITORY,@AS_PROCESS_TYPE='PRE',@AN_SOURCE_BATCH_NO=$BATCH,@AN_TGT_BATCH_NO=$SCRATCH_BATCH,@AS_WS_INACTIVE_FLG=$WS_INACTIVE_FLG"
[Import LOV]
TYPE = SHELL
INCLUDE = List of Value
INCLUDE = List of Value POST RUN
[List of Value]
TYPE = IMPORT
BATCH = $BATCH
SESSION SQL="exec $TABLE_OWNER.LOV_EIM_LOAD @AS_WS_NAME=$TARGET_WORKSPACE,@AS_REPOSITORY_NAME=$TARGET_REPOSITORY,@AS_PROCESS_TYPE='PRE',@AN_SOURCE_BATCH_NO=$BATCH,@AN_TGT_BATCH_NO=$SCRATCH_BATCH,@AS_WS_INACTIVE_FLG=$WS_INACTIVE_FLG"
TABLE = EIM_LST_OF_VAL
ONLY BASE TABLES = S_LST_OF_VAL
[List of Value POST RUN]
TYPE = IMPORT
BATCH = $SCRATCH_BATCH
SESSION SQL="exec $TABLE_OWNER.LOV_EIM_LOAD @AS_WS_NAME=$TARGET_WORKSPACE,@AS_REPOSITORY_NAME=$TARGET_REPOSITORY,@AS_PROCESS_TYPE='POST',@AN_SOURCE_BATCH_NO=$BATCH,@AN_TGT_BATCH_NO=$SCRATCH_BATCH,@AS_WS_INACTIVE_FLG=$WS_INACTIVE_FLG"
TABLE = EIM_LST_OF_VAL
ONLY BASE TABLES = S_LST_OF_VAL
To modify the LOV.ifb file (one-time operation)
-
Open the LOV.ifb file for editing in a suitable text editor (for example, Notepad on Windows).
-
Specify the Table Owner name for your database platform.
This will not change for a given environment, so setting it here eliminates the need to set it every time you run an EIM load for the S_LST_OF_VAL table.
-
Do one of the following:
-
Update the PASSWORD entry with the password of the Siebel database table owner.
-
Comment out the PASSWORD line by adding a semicolon at the start of the line. If you comment out the line, then you must specify the password at runtime. This is more secure, because you are not storing a password in the file, but you must provide the password manually every time you launch an EIM job.
-
-
Make sure that the SESSION SQL in each session is correct for your database platform.
By default, the correct entry (for Oracle, DB2, DB2UDB, or DB2390) is already in place. If you are using Microsoft SQL Server, then copy the first sample MSSQL line into both child sections. Make sure that the @AS_PROCESS_TYPE argument (the third argument for all platforms) is correct for each section, as follows:
-
The [List of Value] section controls the initial load for EIM, which creates the primary LOV records. The Process Type should be PRE.
-
The [List of Value POST RUN] section makes sure that all secondary records (for example, the record copies in other integration workspaces) are created in the database. The Process Type should be POST. The secondary load is performed immediately after the initial load has completed.
-
-
Save the file.
To run the EIM job
-
Populate the EIM_LST_OF_VAL table with the desired records and values, using the database tool of your choice. Make sure that the IF_ROW_BATCH_NUM value is the same for all records.
-
Make sure that the LOV.ifb file you will use to run the EIM job is populated with the appropriate values, as follows:
Variable Description Example Values $BATCH
Matches the IF_ROW_BATCH_NUM used to populate the EIM table. This can be the same every time or you can start with a value and increment for each batch. Using a different batch number each time allows you to leave old batches in the EIM table in case there is ever a need to re-run the batch or determine later in which batch a particular LOV was added.
1000
$SCRATCH_BATCH
This is a temporary batch number used to populate integration workspaces and handle other management tasks related to LOVs and Workspaces as described above.
Note: This value cannot be the same as $BATCH. Any existing content in the EIM table that has that IF_ROW_BATCH_NUM value will be deleted during the process. In general, leaving the default value is easiest and safest to avoid inadvertently deleting any other content from the EIM_LST_OF_VAL table.999999
$TARGET_REPOSITORY
The name of your repository in the target environment. In most cases, this is “Siebel Repository” and this can usually be left as is unless a specific circumstance requires changing it.
Siebel Repository
$TARGET_WORKSPACE
This is the primary workspace into which you would like to import LOVs.
-
In the design repository, this is the initial integration workspace where the LOVs will be created. The LOVs will be marked as active in this workspace (WS_INACTIVE_FLG = N).
-
In the runtime repository, this must be “MAIN”, as that is the only workspace.
MAIN
int_myrelease
$WS_INACTIVE_FLG
Indicates whether the secondary LOVs created in other integration workspaces should be active or inactive after they are loaded.
-
The default value is “Y”, meaning that they will be inactive. This is consistent with creating LOVs in the user interface, in which copies are inactive until an active version is delivered or there is a rebase from a parent where the LOV has been activated.
-
A value of “N” can be used to indicate that all instances of the imported LOVs should be active in all integration workspaces.
Note: This variable is applicable only to design repository environments; runtime repository environments only have one workspace.Y/N
-
-
Run the EIM job in the normal way, specifying the LOV.ifb file that you edited. For more information about running EIM jobs in general, see Running EIM.
-
Clear the LOV cache (in the LOV Administration view) to force the Object Managers to get the new LOVs.
Related Topics
Related Books
For more information about how LOVs work in workspaces in Siebel Web Tools or Siebel Tools, see Using Siebel Tools.
For more information about working with LOVs in the Siebel application user interface, see Siebel Applications Administration Guide.
For more information about performing repository migrations, see Siebel Database Upgrade Guide.