PREV INDEX NEXT    SLUUG HOME

SQL in KSH
Running SQL Scripts in Kornshell

Security Considerations


BAD BAD BAD BAD


    sqlplus -s $systemid/$password@$database <<! 
    @importantDBAroutine.sql;
    !
 

BETTER


    echo "$password" | sqlplus -s $login @script.sql

    sqlplus -s <<!
    $login/$password@$database -- much safer
    -- rest of sql script...
    !

    sqlplus -s <<!
    $(<passwordfile)
    -- rest of sql script...
    !
    

2002 April 10
Tom Chapin -- 314-721-3581 -- tjc@mvp.net