我的编程空间,编程开发者的网络收藏夹
学习永远不晚

ORA-01031: insufficient privileges

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

ORA-01031: insufficient privileges



一、问题描述

通过sqlplus / as sysdba 无法登陆数据库,提示权限不足。


二、模拟测试


1.现象

sqlplus / as sysdba


SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 14 11:09:10 2017


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


ERROR:

ORA-01031: insufficient privileges



Enter user-name: 

ERROR:

ORA-01017: invalid username/password; logon denied



Enter user-name: 

ERROR:

ORA-01017: invalid username/password; logon denied



SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus


2.使用用户密码登陆

<orcldg:orcl:/home/oracle>$sqlplus "sys/oracle@orcl as sysdba"


SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 14 11:09:34 2017


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


ERROR:

ORA-12541: TNS:no listener



Enter user-name: 

ERROR:

ORA-01017: invalid username/password; logon denied



Enter user-name: 

ERROR:

ORA-01017: invalid username/password; logon denied



SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus


3.启动监听后登陆成功

<orcldg:orcl:/home/oracle>$lsnrctl start


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-NOV-2017 11:09:45


Copyright (c) 1991, 2013, Oracle.  All rights reserved.


Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...


TNSLSNR for Linux: Version 11.2.0.4.0 - Production

System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/diag/tnslsnr/orcldg/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcldg)(PORT=1521)))


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcldg)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date                14-NOV-2017 11:09:45

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/orcldg/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcldg)(PORT=1521)))

Services Summary...

Service "orcl" has 1 instance(s).

  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

<orcldg:orcl:/home/oracle>$sqlplus "sys/oracle@orcl as sysdba"


SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 14 11:09:52 2017


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


Connected to an idle instance.


SQL> exit

Disconnected


4.继续提示权限不足报错

<orcldg:orcl:/home/oracle>$sqlplus / as sysdba


SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 14 11:09:58 2017


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


ERROR:

ORA-01031: insufficient privileges



Enter user-name: 

ERROR:

ORA-01017: invalid username/password; logon denied



Enter user-name: 

ERROR:

ORA-01017: invalid username/password; logon denied



SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus


5.查看用户组

<orcldg:orcl:/home/oracle>$id oracle

uid=500(oracle) gid=500(oinstall) groups=500(oinstall)   --缺少dba组

<orcldg:orcl:/home/oracle>$exit

logout


6.加入dba组后登陆成功

[root@orcldg ~]# usermod -a -G oinstall,dba oracle

[root@orcldg ~]# id oracle

uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)

[root@orcldg ~]# su - oracle

<orcldg:orcl:/home/oracle>$sqlplus / as sysdba


SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 14 11:11:07 2017


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


Connected to an idle instance.


三、小结

通常大家建库很少关注为什么Oracle用户要属于组dba,很少关注细节。

往往我们遇到的问题,都是没有按照规范去创建数据库导致的,所以说建库其实也是一个技术活。

以上问题还有可能是其他情况引起,这里不多说。


免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

ORA-01031: insufficient privileges

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

ORA-01031: insufficient privileges ORACLE 报错 故障修复 远程处理

文档解释ORA-01031: insufficient privilegesCause: An attempt was made to change the current username or password without the
ORA-01031: insufficient privileges ORACLE 报错 故障修复 远程处理
2023-11-04

ORA-55302: insufficient privileges string ORACLE 报错 故障修复 远程处理

文档解释ORA-55302: insufficient privileges stringCause: Sufficient privileges were not granted.Action: Ask the database
ORA-55302: insufficient privileges string ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-27486: insufficient privileges ORACLE 报错 故障修复 远程处理

文档解释ORA-27486: insufficient privilegesCause: An attempt was made to perform a scheduler operation without the required
ORA-27486: insufficient privileges ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-46070: Insufficient privileges ORACLE 报错 故障修复 远程处理

文档解释ORA-46070: Insufficient privilegesCause: An attempt was made to execute an Extensible security session function or
ORA-46070: Insufficient privileges ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-41602: insufficient privileges ORACLE 报错 故障修复 远程处理

文档解释ORA-41602: insufficient privilegesCause: The user does not have required privileges on the object.Action: Obtain
ORA-41602: insufficient privileges ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-38817: Insufficient privileges ORACLE 报错 故障修复 远程处理

文档解释ORA-38817: Insufficient privilegesCause: You did not have sufficient privileges to execute the subprogram package
ORA-38817: Insufficient privileges ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-09317: szprv: insufficient privileges ORACLE 报错 故障修复 远程处理

文档解释ORA-09317: szprv: insufficient privilegesCause: The password specified is invalidAction: See OSD error accompanying
ORA-09317: szprv: insufficient privileges ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-27374: insufficient privileges on event source queue ORACLE 报错 故障修复 远程处理

文档解释ORA-27374: insufficient privileges on event source queueCause: The job owner had insufficient privileges on the
ORA-27374: insufficient privileges on event source queue ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-55352: insufficient privileges for policy administration ORACLE 报错 故障修复 远程处理

文档解释ORA-55352: insufficient privileges for policy administrationCause: The necessary privileges needed to administer
ORA-55352: insufficient privileges for policy administration ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-29882: insufficient privileges to execute indextype ORACLE 报错 故障修复 远程处理

文档解释ORA-29882: insufficient privileges to execute indextypeCause: User does not have privileges to execute the
ORA-29882: insufficient privileges to execute indextype ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-13250: insufficient privileges to modify metadata table entries ORACLE 报错 故障修复 远程处理

文档解释ORA-13250: insufficient privileges to modify metadata table entriesCause: The user requesting the operation does
ORA-13250: insufficient privileges to modify metadata table entries ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-56713: Insufficient Resource Manager privileges ORACLE 报错 故障修复 远程处理

文档解释ORA-56713: Insufficient Resource Manager privilegesCause: An attempt was made to switch the consumer group of a
ORA-56713: Insufficient Resource Manager privileges ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-28081: Insufficient privileges – the command references a redacted object. ORACLE 报错 故障修复

文档解释ORA-28081: Insufficient privileges - the command references a redacted object.Cause: The command referenced a
ORA-28081: Insufficient privileges – the command references a redacted object. ORACLE 报错 故障修复
2023-11-05

ORA-04060: insufficient privileges to execute string ORACLE 报错 故障修复 远程处理

文档解释ORA-04060: insufficient privileges to execute stringCause: Attempt to execute a stored procedure without sufficient
ORA-04060: insufficient privileges to execute string ORACLE 报错 故障修复 远程处理
2023-11-04

ORA-41722: insufficient privileges for database change notification ORACLE 报错 故障修复 远程处理

文档解释ORA-41722: insufficient privileges for database change notificationCause: An attempt was made to use CNFEVENTS
ORA-41722: insufficient privileges for database change notification ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-31087: insufficient privileges to delete schema “string” ORACLE 报错 故障修复 远程处理

文档解释ORA-31087: insufficient privileges to delete schema stringCause: An attempt was made to delete a schema resource
ORA-31087: insufficient privileges to delete schema “string” ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-55336: insufficient privileges for using one or more of the models and rules indexes ORACLE 报错 故

文档解释ORA-55336: insufficient privileges for using one or more of the models and rules indexesCause: An attempt was made
ORA-55336: insufficient privileges for using one or more of the models and rules indexes ORACLE 报错 故
2023-11-05

编程热搜

目录