从批处理文件执行SQL [英] Execute SQL from batch file
本文介绍了从批处理文件执行SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新来的批处理文件的脚本。
I'm new to batch files scripting.
我要的是创建调用文本文件SQL文件并存储结果的批处理文件。
All I want is creating a batch file that calling SQL file and store results in text file .
谁能帮我,你的帮助是非常AP preciated,
Can anyone help me, your help is highly appreciated,
这是我第一次需要创建此类文件。
This is the first time I need to create such files.
推荐答案
使用DOS批处理文件:
using a DOS batch file:
保存和运行这样的:
@echo off
sqlplus -s -l user/pass@yourdb @yoursql.sql>your_log.log
P.S。一定要有你的sql脚本的最后行退出;
或批处理文件将挂起
这篇关于从批处理文件执行SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文