linux:
# !/bin/sh
#
#这个文件在linux中必须有运行权限。如果没有可以运行 chmod +x runsql.sh
#
su - oracle -c "sqlplus test/123456" << EOF
@/home/oracle/run.sql
windows:
sqlplus test/zfsoft_321 @path/to/run.sql
echo finished
windows环境下没测试。。。。。
本文介绍了一种在Linux和Windows平台上执行SQL脚本的方法。在Linux环境下通过shell脚本调用sqlplus工具,并设置运行权限;在Windows下直接使用sqlplus命令执行脚本。尽管Windows环境下的测试尚未完成,但提供了基本的执行流程。
linux:
# !/bin/sh
#
#这个文件在linux中必须有运行权限。如果没有可以运行 chmod +x runsql.sh
#
su - oracle -c "sqlplus test/123456" << EOF
@/home/oracle/run.sql
windows:
sqlplus test/zfsoft_321 @path/to/run.sql
echo finished
windows环境下没测试。。。。。
174

被折叠的 条评论
为什么被折叠?