如何为 SQLPlus 创建批处理文件? [英] How can I create a batch file for SQLPlus?

查看:64
本文介绍了如何为 SQLPlus 创建批处理文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个批处理文件,即batch.bat.

I need to create a batch file, i.e., batch.bat.

当我们执行这个文件时:

When we execute this file:

  1. 它将打开 SQLPlus
  2. 它将调用一个名为 file1.sql 的文件.

file1.sql 包含特定用户的创建和插入脚本.

file1.sql contains the creation and insertion scripts for a particular user.

我有 file.sql,但我需要知道的是,如何创建批处理文件来执行此功能?

I have file.sql, but what I need to know is, how do I create a batch file to perform this function?

推荐答案

一个小测试脚本(存储在名为 test.sql 的文件中):

A little test script (stored in file named test.sql):

select 1 from dual;

exit;

...并执行它:

sqlplus user/password @test.sql

这篇关于如何为 SQLPlus 创建批处理文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆