I would be really thankful, if anyone could help me out with this,since i am very new to this shell scripting.
I have 6 sql scripts that i am trying to run in unix across db2.
i want the scripts to be executed as follows,
script_1 should be executed first.
Then script_2,script_3,script_4,script_5 should be executed simultaneously.
Once, after all these are done with execution, i need to execute script_6
below is the code which will execute the sql command/existing .sql files in oracle. before doing this you have to provide the ORAUSER, ORAPWD and SPOOLFILE. This should be in the path where you having all the 6 .sql sciprt files. Try and let me know.
ORAUSER="oracle_username"
ORAPWD="oracle_password"
SPOOLFILE="spool filename"
sqlplus -s $ORAUSER/$ORAPWD >/dev/null <<!
set show off
set term off
set termout off
set trimspool on
set verify off
set feedback off
set pagesize 0
set long 2048
set longchunksize 2048
set linesize 2048
set trimspool on
set trim on
SPOOL $SPOOLFILE
@script1.sql
@script2.sql
@script3.sql
@script4.sql
@script5.sql
@script6.sql
SPOOL OFF;
!