请提供有关SQLPLUS的帮助?最初如何使用DEFINE`OFF`使SQLPLUS启动? [英] Help with SQLPLUS please? How to make SQLPLUS startup with DEFINE `OFF` initially?
问题描述
我有一个批处理脚本,该脚本可以使用连接详细信息调用PLSQL,该脚本可以正常工作,但在连接时仍必须显式地SET DEFINE OFF
.我想增强我的简单批处理脚本,以将SET DEFINE OFF命令传递给SQLPLUS,以便在连接后不再需要手动发出该命令.
I have a batch script that invokes PLSQL with connection details, which works fine but I still have to explicitly SET DEFINE OFF
when I connect. I would like to enhance my simple batch script to pass the SET DEFINE OFF command to SQLPLUS so that once I am connected, I will no longer have to issue that command manually.
echo set define off | sqlplus user/pwd@tnsname
这不起作用.我已登录,然后立即再次注销(输出如下):
This does not work. I am logged in, and logged out again immediately (output follows):
SQL * Plus:版本10.2.0.3.0-2009年6月15日星期一生产16:43:17
版权所有(c)1982、2006,Oracle.版权所有.
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Jun 15 16:43:17 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
已连接到: Oracle Database 10g企业版10.2.0.4.0版-生产 有了分区,OLAP,数据挖掘和实际应用程序测试选项
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL>与Oracle数据库断开连接 10g企业版10.2版. 0.4.0-生产 有了分区,OLAP,数据挖掘和实际应用程序测试选项
SQL> SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2. 0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
D:>
推荐答案
或在当前目录中名为login.sql的文件中.
Or in a file called login.sql in your current directory.
这篇关于请提供有关SQLPLUS的帮助?最初如何使用DEFINE`OFF`使SQLPLUS启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!