首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

请问一个sqlplus的有关问题

2013-07-01 
请教一个sqlplus的问题使用批处理执行文件sql时,如果出现用户名、密码或者tns错误会提示如下信息等待键盘输

请教一个sqlplus的问题
使用批处理执行文件sql时,如果出现用户名、密码或者tns错误会提示如下信息等待键盘输入,有什么办法不等待键盘输入直接退出批处理呢?
SQL*Plus: Release 11.2.0.1.0 Production on Wed May 8 11:14:15 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name: 
ERROR:
ORA-12546: TNS:permission denied


Enter user-name: 
ERROR:
ORA-12546: TNS:permission denied


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus oracle?sqlplus
[解决办法]
--使用-L参数即可。只尝试登陆一次,而不是在出错时提示。
sqlplus scoot/tiger@orcl1 -l

热点排行