您在这里:首页 > 学员专区 > 技术文章
Oracle视频
Oracle
CUUG课程

10g Sqlplus工具登陆小改进

 

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

 

 

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

[oracle@yans1 ~]$ sqlplus

SQL*Plus: Release10.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 Database10gEnterprise Edition Release10.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: Release10.2.0.3.0 - Production on星期六8月8 22:05:14 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

 

Connected to:

Oracle Database10gEnterprise Edition Release10.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: Release9.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 Release9.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工具而言,也在不断的提高易用性。

相关文章 [上一篇] 限制SQLPLUS工具可执行的命令
010-88589926(88587026)
CUUG热门培训课程
Oracle DBA就业培训
CUUG名师
网络课程
技术沙龙
最新动态

总机:(010)-88589926,88589826,88587026 QQ讨论群:243729577 182441349 邮箱:cuug_bj@cuug.com
通信地址:北京市海淀区紫竹院路98号北京化工大学科技园609室(CUUG)邮政编码:100089 
中国UNIX用户协会 Copyright 2010  ALL Rights Reserved 北京神脑资讯技术有限公司
京ICP备11008061号  京公网安备110108006275号