Oracle sqlplus 在 Windows 批处理中执行 sql 文件



我已经安装了 Sqlplus 并在 cmd 中运行了下面的批处理文件。

"D:setupsinstantclient_11_2sqlplus.exe" username/password@"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=111.111.111.11) (PORT=1521)))(CONNECT_DATA=(SID=orcl)))"  @"E:sql scriptsprocedure.sql"

这就是我得到的。我的过程意味着将记录插入到表中,但该表仍然是空的。

E:p01-material big data projectsbatch>sql.bat
SQL*Plus: Release 11.2.0.4.0 Production on 星期四 1月 25 11:22:29 2018
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
  6

它永远留在这里。6 在这里可能是因为我的 sql 文件procedure.sql有 6 行语句。我怎样才能做到这一点?

谢谢

过程的最后一行。SQL 应该是正斜杠/。它向 SQL*Plus 显示你已终止该过程并将运行它。

或者,当您看到"6"(它是行号;SQL*Plus等待您输入内容(,输入/并按键盘上的"输入"键。

最新更新