处理ORA-01031一例

简介: 处理ORA-01031一例

处理ORA-01031一例

现象

oracle用户登录不了:

[oracle@centos65-195 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 24 15:14:44 2019
Copyright © 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges


分析

查看network的配置文件,发现参数SQLNET.AUTHENTICATION_SERVICES 设置为 NONE, 初步怀疑是这个参数的问题,把它封住:

[oracle@centos65-195 admin]$ cat sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
#SQLNET.AUTHENTICATION_SERVICES =NONE
ADR_BASE = /u01/app/oracle


还是不行,故障照旧,再查看那个os组被设置为oracle dba:

[oracle@centos65-195 admin]$ cat $ORACLE_HOME/rdbms/lib/config.c
/*  SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access.  */
/*  Refer to the Installation and User's Guide for further information.  */
/* IMPORTANT: this file needs to be in sync with
              rdbms/src/server/osds/config.c, specifically regarding the
              number of elements in the ss_dba_grp array.
 */
#define SS_DBA_GRP "dba"
#define SS_OPER_GRP ""
#define SS_ASM_GRP ""
char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP, SS_ASM_GRP};


再看看oracle的用户id:

uid=500(oracle) gid=500(oinstall) groups=500(oinstall),504(asmdba)


根源

看来是oracle的用户不属于dba这个组造成的,加上这个组:

# usermod -G dba oracle
退出重新登录试试,成功了。
$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 24 15:24:37 2019
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> quit
相关文章
|
关系型数据库 Oracle
ora.rhpserver
ora.rhpserver 作用
1639 0
|
Oracle 关系型数据库
ora.chad
ora.chad 进程描述,和作用。
2984 0
|
Oracle 关系型数据库
|
Oracle 关系型数据库
|
Oracle 关系型数据库
|
网络协议 Oracle 关系型数据库
ORA-12545 问题
今天遇到ORA-12545问题一直以为设置了LOCAL_LISTENER参数就没有问题,但是今天能遇的问题是设置了LOCAL_LISTENER没有问题,但是还是报错,这种情况下在客户端HOSTS中把RAC的HOSTS下面的内容复制上去,让他能够解析 ORAC...
1039 0