前两天在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 [ [
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工具而言,也在不断的提高易用性。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4227/viewspace-611671/ ,如需转载,请注明出处,否则将追究法律责任。