Created
November 17, 2010 15:53
-
-
Save finsterthecat/703543 to your computer and use it in GitHub Desktop.
Driver script to run a series of scripts (sql, sqlldr or otherwise) within oracle sqlplus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- cross platform! Works on unix and windows. Notice ability to run host programs?! | |
accept _usr prompt 'UserName: (app) ' default 'app' | |
accept _pwd prompt 'Password: (&_usr) ' default &_usr hide | |
accept _tns prompt 'TNSalias: (SUE2DEV) ' default 'SUE2DEV' | |
whenever sqlerror exit | |
connect &_usr/&_pwd@&_tns | |
whenever sqlerror continue | |
-- your SQL and OS scripts here | |
@@script1.sql | |
@@script2.sql | |
host sqlldr &_usr/&_pwd@&_tns control=script3.ctl | |
undefine _usr _pwd _tns |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment