请教一个sqlplus的问题

yangqm22 2013-05-08 11:11:58
使用批处理执行文件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
...全文
85 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
vanjayhsu 2013-05-08
  • 打赏
  • 举报
回复
--使用-L参数即可。只尝试登陆一次,而不是在出错时提示。 sqlplus scoot/tiger@orcl1 -l

3,491

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 高级技术相关讨论专区
社区管理员
  • 高级技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧