脚本内容:
spool C:\Users\Administrator\Desktop\log\批量脚本日志.log;
set feedback off;
set define off;
prompt -----初始化数据 start---
@@xx1.sql;
@@xx2.sql;
prompt -----初始化数据 end---
prompt done;
spool off;
执行时plsql打印:
SQL> @C:\Users\Administrator\Desktop\批量脚本执行.sql;
Started spooling to C:\Users\Administrator\Desktop\log\批量脚本日志.log
-----初始化数据 start---
-----初始化数据 end---
done
Stopped spooling to C:\Users\Administrator\Desktop\log\批量脚本日志.log
日志文件内容:
-----初始化数据 start---
-----初始化数据 end---
done