I have to run multiple SQL script file in one go.
Like every time i have to write command in SQLPLUS
SQL>@d:\\a.txt SQL>@d:\\a2.txt SQL>@d:\\a3.txt SQL>@d:\\
Use *.PDC
extension file like this
install.pdc file content
whenever sqlerror exit sql.sqlcode
prompt started!
prompt 1.executing script 1
@@install/01.script_1.sql
prompt 2.executing script 2
@@install/02.script_2.sql
prompt 3.executing script 3
@@install/03.script_3.sql
prompt finished!
where @@install/
points in which directory is the SQL script located
Some tricks and command can help you to generate master.sql file and you can run from that location.
c:\direcotory_location\dir *.sql /-t /b >master.sql
Go to the parent directory open master.sql open using notepad++ remove master.sql line and use regular expression to replace
\n with \n @
go to cmd From cmd
C:\root_directory\sqlplus user/password @master.sql
I find this process very convenient if i have 30 to 40 scripts placed in a single directory.