Wednesday 13 January 2016

How to Export Siebel Repository on Linux environment

Hi All,

Exporting and importing repository is task in most of deployment, where major changes are being done in the application. For smaller changes we just replace the SRF and not import repository(not a good practice) but in major implementation its important to import the repository too.

Exporting repository in Linux very much similar to that in windows.
we need to follow the following steps.

1. Connect to server with GUI based display like VNC viewer(unlike windows linux is not GUI based)

open Terminal/Konsole in the server.

2. The Terminal enter the following command to Database configuration wizard.

./ -mode dbsrvr (run this under $SIEBEL_ROOT/config directory)

note : before running the command, make sure Siebel enterprise server is down and gateway server is running.
also source the required variable by running the command 
. ./ 

3. This command Opens up the Wizard now provide the required details as follows

Specify the Server Directory, click next

4. Select Database ,click next

5. Select the Operation to Perform , in our case Import/Export Repository


6. Select Export Repository, click next

7. Select the Datasource name generally SIEBEL_DSN, configured while installation.

8. Provide Username/Passowrd as SADMIN/SADMIN ,click next.

If there is some error while clicking next, stating user access then in that case we need to check if profile was sourced properly also it can be issue related to file which needs to be run in that case(under $SIEBE_ROOT/siebsrvr).

9. Provide Username/Passowrd as SIEBEL/SIEBEL ,click next.

10. Click Next

11. Provide the location and name to Repository file that will be created, click next

12. select the highlighted option click next.

13. Click Next

14.  Specify Log directory and Final configuration settings

15. The following message appears after specifying configuration, note the command specified in the message, next we need to run this command for final output.

16. The wizard closes and we are back to terminal now run the command as specified in previous step.

under Bin directory of siebsrvr($SIEBEL_ROOT/siebsrvr/bin)

srvrupgwiz /m master_exprep.ucf

the process takes around 20 to 30 minutes and file is created under the specified directory.

Monday 4 January 2016

Prevent Duplicate records in Siebel

Hi All,

Recently i came across a very useful method to check duplicate values in Siebel.

The basic approach for checking duplicate that comes to our mind is,

  1. Compare the current record with all the previous record before writing to database ,this can be done using scripting but it is much heavy approach and may impact performance.
  2. Suppose there are n records in database and when inserting (n+1) th records, the above approach will query in database and compare the current record with all the existing n records and the performance will be impacted say when n reaches many thousands.

a better way to avoids custom scripting is using the following calculated expression.

BCHasRows("Contact","Contact","[Email Address]='"+[Email Address]+"'","All")

this expression takes in the following argument

BCHasRows(Business Object,Business Component,Field to check,View Mode)
more information can be refered from siebel bookshelf.

I tried this for Checking Checking and Preventing duplicate Email.

Configuration Steps.

1. Create a Calculated field on BC name it

2. Enter following value in Calculated Expression

BCHasRows("Contact","Contact","[Email Address]='"+[Email Address]+"'","All")

3. Check Immediate post changes for the field.

4. In the  BusComp_PreWriteRecord method write following code to raise error text if duplicate Email is entered.

function BusComp_PreWriteRecord ()
var IsDuplicate = this.GetFieldValue("DuplicateEmail");

  TheApplication().RaiseErrorText("Mail Id Already Exist");
return (ContinueOperation);

5. Error is raise when Duplicate Email is entered

Hope this was helpful.... cheers

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...