sqlloader shell script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • orajit
    New Member
    • Nov 2007
    • 75

    sqlloader shell script

    Hi am calling sqlloader inlow shell script

    #!/bin/sh
    sqlldr scott/tiger control=ulcase1 .ctl log=ulcase1.log
    retcode=`echo $?`
    case "$retcode" in
    0) echo "SQL*Loader execution successful" ;;
    1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
    2) echo "SQL*Loader exectuion exited with EX_WARN, see logfile" ;;
    3) echo "SQL*Loader execution encountered a fatal error" ;;
    *) echo "unknown return code";;
    esac

    #!/bin/ksh

    while read table_name
    do
    echo "

    I have set database name as scott/tiger .

    I have following queries

    1) what need to be done if i need to call that shell script in another database .
    Means everytime its not posible to change the database name ..

    is there any automatic process for it

    thanks
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    If you want to change the database name on the fly then declare a variable and use it in the command.
    The variable will be initialized either from command prompt or from a file

    Hope i am clear

    Raghu

    Comment

    Working...