SQLplus必须先以sysdba身份登录,才能用其他用户登录么?

iw1210 2012-12-26 10:50:51
SQLplus必须先以sysdba身份登录,才能用其他用户登录么?

直接用 SCOTT 登录不上,提示让输入用户名,按提示输入用户名和密码还是不能登录,如下:
$ sqlplus SCOTT/TIGER

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 27 10:45:26 2012

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

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0


Enter user-name:

但先用sys登录,然后再用SCOTT登录就可以,为什么? 如下:

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 27 10:47:33 2012

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

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 1202556928 bytes
Fixed Size 2212816 bytes
Variable Size 335547440 bytes
Database Buffers 855638016 bytes
Redo Buffers 9158656 bytes
Database mounted.

SQL> show user
USER is "SYS"
SQL> alter database open;

Database altered.

SQL> !sqlplus SCOTT/TIGER

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 27 10:48:55 2012

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show user
USER is "SCOTT"
SQL>


...全文
1030 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
善若止水 2013-01-08
  • 打赏
  • 举报
回复
看你的说明,我认为是你的数据库在没有完全启动起来前,你用scott用户登陆,此时登不上。然后,你用sys用户把数据库启动后,然后才能用scott用户登陆。 我估计有两点: 一 服务和监听没有启动 二 服务和监听启动后,数据库没有启动起来
huangdz1985 2013-01-08
  • 打赏
  • 举报
回复
安全性要求要高哦!
fw0124 2012-12-26
  • 打赏
  • 举报
回复
如果一定要禁止sqlplus / as sysdba这样不需要密码的操作系统认证登陆, 可以修改ORACLE_HOME目录下的network\admin\sqlnet.ora, 其中的SQLNET.AUTHENTICATION_SERVICES参数修改为NONE.
fw0124 2012-12-26
  • 打赏
  • 举报
回复
引用 3 楼 iw1210 的回复:
谢谢楼上~ $ sqlplus / as sysdba 这样不许要密码就可以打开数据库不安全啊,如何设置成需要指定用户名和密码才能打开数据库?
这个只能在数据库服务器本机,并且需要DBA组的用户登陆。所以说安全性不是问题。
iw1210 2012-12-26
  • 打赏
  • 举报
回复
谢谢楼上~ $ sqlplus / as sysdba 这样不许要密码就可以打开数据库不安全啊,如何设置成需要指定用户名和密码才能打开数据库?
linwaterbin 2012-12-26
  • 打赏
  • 举报
回复
1楼正解! 开库关库只能由sys或者sysdba权限的人来干
软件钢琴师 2012-12-26
  • 打赏
  • 举报
回复
启动 关闭实例 只能 是 sys 用户 ,或者 授予了 sysdba 角色的用户 只有实例启动了,加载并打开了数据库 ,其它用户才可以连数据库啊

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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