10g Sqlplus工具登陆小改进 [转帖]_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3639 | 回复: 0   主题: 10g Sqlplus工具登陆小改进 [转帖]        下一篇 
wayne
注册用户
等级:中校
经验:1690
发帖:221
精华:0
注册:2011-7-21
状态:离线
发送短消息息给wayne 加好友    发送短消息息给wayne 发消息
发表于: IP:您无权察看 2011-8-25 18:34:41 | [全部帖] [楼主帖] 楼主

前两天在ITPUB上看到一个帖子,提到如何用最快的方法以SYSDBA登陆数据库。

有人给出的方法是sqlplus直接回车,然后在提示用户名时输入/ as sysdba:

[oracle@yans1 ~]$ sqlplus


SQL*Plus: Release 10.2.0.3.0 - Production on 星期六 8月 8 22:01:47 2009

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: / as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>


其实在10g中,sqlplus做了改进,可以在sqlplus后面直接加上/ as sysdba,而不需要双引号或单引号:

[oracle@yans1 ~]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.3.0 - Production on 星期六 8月 8 22:05:14 2009

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>


在9i中,sqlplus还没有这个功能,必须在/ as sysdba两边加上引号。

bash-2.03$ sqlplus / as sysdba
Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
where <option> ::= -H -V [ [-L] [-M <o>] [-R <n>] [-S] ]
<logon> ::= <username>[/<password>][@<connect_string>] / /NOLOG
<start> ::= @<URI> <filename>[.<ext>] [<parameter> ...]
"-H" displays the SQL*Plus version banner and usage syntax
"-V" displays the SQL*Plus version banner
"-L" attempts log on just once
"-M <o>" uses HTML markup options <o>
"-R <n>" uses restricted mode <n>
"-S" uses silent mode
bash-2.03$ sqlplus "/ as sysdba"


SQL*Plus: Release 9.2.0.4.0 - Production on 星期六 8月 8 22:25:16 2009

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL>


从这种小的变化也可以看出,对于Oracle最基础的sqlplus工具而言,也在不断的提高易用性。




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论