
So the today experience was tremendous! Something like super LOL!
Had 59 files to be executed versus ORA dbase.. I think ok, is time to bring sql*plus in the game, crap, not compatible with half of the scripts (scripts made by vendor, each file is ~2pages SQL)...
Damn, what to do ? The KB says execute it carefully one by one to SQL DEVELOPER IDE!!!
What the hell are you talking about???????? #LOL
Found SQLcl (sql.exe), you can execute SQL and PL/SQL statements interactively
JavaScript:
@echo off
echo Started %DATE% %TIME%
for %%f in (*.sql) do (
if %%f==y.sql (
echo 'y.sql' found, please execute it via SQL DEVELOPER then continue here by 'x.sql'
pause
exit
)
if %%f==x.sql (
echo 'x.sql' found, please execute it via SQL DEVELOPER then continue here by 'z.sql'
pause
exit
)
echo **Executing %%f...
::log to file
echo exit | C:\sqldeveloper\sqldeveloper\bin\sql.exe -s xxxx/##password###@xxxx.com:1000/XXXXX @%~dp0%%f > %~dp0%%f.log
::read log file to screen
type %~dp0%%f.log
echo:
echo **Script %%f execution complete.
echo:
echo:
::timeout is case user want to break the execute, if the previous script failed
timeout /t 5
)
echo Master finished...