命令行需要用 \ 的斜杠,
C:\Users\a528692\Desktop\temp\runSQL.bat
@echo off cd %4 sqlplus -s %1/%2@%5 as sysdba @%3 echo 1 exit
C:\Users\a528692\Desktop\temp\PB\201606020002_ZX_test.sql
spool c:/log/init.log; @GCE_METRICS/Alter_Tables/update_test_sql.sql --34741 @GCE_METRICS/Alter_Tables/update_test_sql2.sql --34741 SPOOL OFF;
提示: spool 命令需要在 sql文件中,如果是在sql plus 也是直接在sql plus 命令行中。