Executing a oracle script using O/S multi threads ( shell script )


1)  ssa.in   - This file contains all the values for which a procedure is to be run on O/S shell

$ cat ssa.in

ADB
ATP
CDP
ELR
GTR
KAA
KHM
KNL
MBN
NGD
NLR
NZB
ONG
RMY
SGD
SK
TRP
VJA
VM
VZM
WGL
HTD




2) temp.sh   - This takes the above file and executes the tempsql.sql script ,opens multi sessions in the background

$ cat temp.sh

for i in `cat ssa.in`
do
sh tempsql.sql $i&
done

3)  tempsql.sql  - This calls the procedure  ----  mis_indiaone_mt  - this given in 4)

$ cat tempsql.sql

sqlplus dotsoft/lab6510g <
set serverout on;
exec mis_indiaone_mt('$1');
EOF

$



 


Post a Comment

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post