ORA-01031 故障处理方法



1.故障现象:

   报ORA-01031: insufficient privileges 错误,本地命名方式无法登录:


[oracle@edbjr2p2 admin]$ sqlplus sys/oracle@PROD3 as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jan 21 04:32:12 2017

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

ERROR:
ORA-01031: insufficient privileges


Enter user-name: ll
Enter password:
ERROR:
ORA-01005: null password given; logon denied


2.尝试OS 验证登录,登陆正常,暂时排除数据库本身问题:

[oracle@edbjr2p2 admin]$export ORACLE_SID=PROD3

[oracle@edbjr2p2 admin]$ sqlplus  / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jan 21 04:33:08 2017

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


 SYS @ PROD3 >show parameter remote

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_dependencies_mode             string      TIMESTAMP
remote_listener                      string
remote_login_passwordfile            string      EXCLUSIVE
remote_os_authent                    boolean     FALSE
remote_os_roles                      boolean     FALSE
result_cache_remote_expiration       integer     0



# 发现没有密码文件用户(或未发现),也无法授予权限,提示密码文件丢失或无效:

 SYS @ PROD3 >select * from v$pwfile_users;

no rows selected


 SYS @ PROD3 >grant sysdba to sys;
grant sysdba to sys
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled


 SYS @ PROD3 >exit

[oracle@edbjr2p2 dbs]$ pwd
/u01/app/oracle/product/11.2.0/db_1/dbs


#发现密码文件拼写有误:

[oracle@edbjr2p2 dbs]$ ll


-rw-rw---- 1 oracle oinstall  1544 Jan 18 18:57 hc_PROD3.dat
-rw-r--r-- 1 oracle oinstall   535 Jan 18 19:00 initPROD3.ora
-rw-r----- 1 oracle oinstall    24 Jan 18 19:14 lkPROD3
-rw-r----- 1 oracle oinstall  5120 Jan 18 18:47 orapwdPROD3
-rw-r----- 1 oracle oinstall  2560 Jan 18 19:58 spfilePROD3.ora

#重建密码文件

[oracle@edbjr2p2 dbs]$ orapwd file='/u01/app/oracle/product/11.2.0/db_1/dbs/orapwdPROD3'password=oracle

OPW-00005: File with same name exists - please delete or rename



[oracle@edbjr2p2 dbs]$ rm orapwdPROD3
[oracle@edbjr2p2 dbs]$ orapwd file='/u01/app/oracle/product/11.2.0/db_1/dbs/orapwPROD3'password=oracle


[oracle@edbjr2p2 ~]$ export ORACLE_SID=PROD3
[oracle@edbjr2p2 ~]$ sqlplus
sys/oracle@PROD3 as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jan 21 04:59:12 2017

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


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

 SYS @ PROD3 >

 SYS @ PROD3 >select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS                            TRUE  TRUE  FALSE


如果口令文件创建的有问题,也是会报如下的错误:

ora-01031:insufficient privileges

口令文件的命名格式应为orapwsid,并且sid是区分大小写的。由于Target Database连接Auxiliary Database时需要验证口令,
如果违反了以上规则,将会提示ORA-01031: insufficient privileges。




博文链接:http://www.cnblogs.com/kelantas/archive/2011/02/18/1958173.html

博文链接2:http://blog.csdn.net/wyzxg/article/details/4301266


 


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部