Task Based UI @ Siebel 7.8 | Next Tip »Home

How to trigger stored procedure through shell script?

OkAvarageGoodVery GoodExcellent (2 votes, average: 4.50 out of 5)
Loading ... Loading ...

I know that this is not a requirement that you will face everyday but I did face it and didn’t find anything useful on the web which could tell me exact script that I can use to trigger a stored procedure residing the database.

There are some questions that might cross you mind such as…

1. Why do I need execute a stored procedure on database?

Answer: There can be several requirements that might require you to do that but most common of all will be in case of data migration through EIM. For example:

You are getting data in EIM tables and you need to trigger EIM job to load that data from EIM tables to base tables (you might think easy, trigger an EIM job) but the catch here is that this data is not clean and there are duplicate record present which can result in your EIM process to fail.

You have created a stored procedure that can process this data and make it clean but how to do you trigger that stored procedure after data is loaded in EIM tables and before EIM Job is triggered?

2. Isn’t there any other way I can handle this?

Answer: The easiest way to handle this is to ask external application to provide clean :) data but that is seldom possible.

Handling it from within Siebel is going to increase complexity of solution a lot and also if you are thinking of handling it at business layer then you might introduce performance issue in your application while your process is running at database.

I think the best way to handle it at database layer and this approach is least intrusive and most stable.

Please do share if you have better idea or approach and ask any question that might come to your mind.

So, not wasting your time further below given link will provide you access to script to trigger a stored procedure at database.

STORED_PROC_SCRIPT

  • Share/Bookmark

Related Posts


Article by neel

Authors bio is coming up shortly. neel tagged this post with: Read 387 articles by neel
  • sdp
    in the same context...has anyone made use of siebel provided business service "EAI ODBC Service", from its methodname and arguments it appears that it can used for calling stored procedure...

    Business Service = EAI ODBC Service
    Method = ExecuteProc
    Arguments = ExtDBODBCDataSource
    ExtDBPassword
    ExtDBTableOwner
    ExtDBUserName
    ProcedureArgument
    ProcedureName
    Status
  • I just saw that business service and I think you are right... but I will have to try before I can confirm it works or not.

    But thanks for the info
  • Rajkumar
    I have one situation. Siebel is installed on Windows machine and database is on Unix. Is it possible to trigger EIM job from Unix in this case?
    I have one situation. Siebel is installed on Windows machine and database is on Unix. Is it possible to trigger EIM job from Unix in this case?

    --Posted again for notification via email
  • But why do you want to do that.

    You can fire EIM Job from windows system using batch script and schedule that batch script using windows scheduler.
    It will be easier to manage this. You need to fire the same server manager command from batch script I had provided in unix script.
    Will try to post the script that can work.
  • Lajja
    There is one more option:

    Write an eScript using Clib function and invoke a database client.

    Clib.system("sqlplus SADMIN/SADMIN@DBName @C:\TEST.SQL")

    where TEST.SQL stores SQL script.

    eScript can be called from a workflow and thus can be triggered.
  • Shiv Prateek
    hi nice article...
    ut how are you going to fill it in between
    how to do you trigger that stored procedure after data is loaded in EIM tables and before EIM Job is triggered?

    i believe u will be moving the whole process of calling the EIM to shell script too
  • Very useful article, thanks a lot!

    One thing, that might be useful für a Windows/MSSQL environment. You can do basically the same here. When you are on a client machine you need to have the MSSQL client tools installed (or you use the MSSQL server tools).

    ...\>osql.exe -S [server_name] -U [user_name] -P [password] -d [db_name] -Q "exec [proc_name]"

    There are more parameters for timeouts, packet size and so on, but Q (not q) is the most important one because it tells the command line tool to execute the SQL command and exit.

    Keep up the good work!

    Peter
blog comments powered by Disqus

Polls

Do you like the new Comment System and new look to Site?

View Results

Loading ... Loading ...