Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    1

    Unanswered: How to wait until the plsql program completes in UNIX shell script

    Hi,

    I am a novice in Unix shell scripting. I have a query
    I am invoking a plsql program from a Unix Shell Script. Shell script program needs to wait until the plsql program completes. Can any body tell me how can I achieve this.

    Thanks for your help

    Vinay

  2. #2
    Join Date
    Nov 2007
    Location
    Connecticut
    Posts
    40

    wait

    use the unix wait command

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I am invoking a plsql program from a Unix Shell Script.
    You can NOT direct invoke a PL/SQL procedure from any Unix shell. You must invoke some DB client program which can invoke the PL/SQL procedure.
    >Shell script program needs to wait until the plsql program completes
    What make you think it does not wait?

    Use CUT & PASTE to show us what you are actually doing & how the system responds.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Nov 2007
    Location
    Connecticut
    Posts
    40

    wait

    Good points from anacedent -- in reading your orig post I assumed that you executed your code in the background -- and thus needed to "wait" to move on to next sequence of code

    example of this is needing to create indexes b4 exchange partition command

    generic run_sql script I wrote below to accep a file to create indexes show this technique from a ksh script

    nohup $BIN_DIR/run_sql.ksh "$SQL_DIR/create_es2_idx_1.sql" &
    nohup $BIN_DIR/run_sql.ksh "$SQL_DIR/create_es2_idx_2.sql" &
    nohup $BIN_DIR/run_sql.ksh "$SQL_DIR/create_es2_idx_3.sql" &
    wait


    then ex part

    If code is not running in the background, oracle always has to wait for completion by default

Posting Permissions

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