Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    India
    Posts
    191

    Unanswered: Is this possible!!!

    Hi,
    I have one trigger, which call procedure. This procedure will call a shell script.This shell script will run some sessions. I want my transaction to complete,Oracle shouldn't wait for sessions to complete( In short , i want session to run in backgroud)...Is this possible. Any example will be kindly appreciated.

    Thanks,
    Pagnint
    (No need to search web before posting new question)

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    To run other Oracle stuff in the background, use the DBMS_JOB package.

    I don't know much about calling Shell scripts from Oracle, but I believe it involves writing Java. In fact, here is a link to an Ask Tom article on this subject:

    http://asktom.oracle.com/pls/ask/f?p...ID:16212348050

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Unix, I presume? I don't use it, but know something about VMS and suppose Unix should have something similar: there's a SUBMIT command in VMS which allows you to, well, submit a background process. Control is immediately returned to the calling script.

    For this example, VMS Scripts are:
    Code:
    $ ! PROC_1.COM
    $ tim
    $ submit /noprint proc_2.com
    $ tim
    $ ! END OF PROC_1
     
    $ ! PROC_2.COM - takes several seconds to execute
    $ dir [...]*.* /l
    $ ! END OF PROC_2
    Running PROC_1 generates output:
    Code:
    10-MAY-2004 11:36:05
    Job PROC_2 (queue SYS$BATCH, entry 175) started on SYS$BATCH
    10-MAY-2004 11:36:05
    


    As you see, proc_2.com executes in background and it takes almost no time to return to calling script.

  4. #4
    Join Date
    Jan 2004
    Location
    India
    Posts
    191
    thank you very much...i will go through ask tom article..hope it will help me
    Once again thanks!!!

    Thanks,
    Pagnint
    (No need to search web before posting new question)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •