解决sqlplus as sysdba遇到ORA-01017 的问题

今天发现sqlplus "/as sysdba"无法登陆的问题,后来发现是由于oracle用户不数据DBA组导致的

[oracle@scaqan04dv0208 ~]$ source GZhouDB.env
[oracle@scaqan04dv0208 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jun 17 08:00:01 2020
Version 19.7.0.0.0

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

ERROR:
ORA-01017: invalid username/password; logon denied


[oracle@scaqan04dv0108 ~]$ id oracle
uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1004(asmdba),1005(asmoper),1006(asmadmin),1002(dba),1003(racoper)
由于有一次运行usermod -G时疏漏了1002这个组,导致无法连接
不小心remove了1002 dba这个组

如果oracle不属于dba组,那么srvctl也会出现问题,并且错误的指示性不强

[root@scaqan04dv0108 ~]# id oracle
uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1004(asmdba),1005(asmoper),1006(asmadmin),1002(dba),1003(racoper)
[root@scaqan04dv0108 ~]# usermod -G 1001,1003,1004,1005,1006 oracle
[root@scaqan04dv0108 ~]# su - oracle
Last login: Wed Jun 17 08:14:22 UTC 2020
[oracle@scaqan04dv0108 ~]$ source GZhouDB.env
[oracle@scaqan04dv0108 ~]$ srvctl stop database -d gzhoudb
PRCD-1334 : failed to stop database gzhoudb
PRCD-1124 : Failed to stop database gzhoudb and its services
PRCD-1131 : Failed to stop database gzhoudb and its services on nodes
PRCR-1133 : Failed to stop database gzhoudb and its running services
PRCR-1132 : Failed to stop resources using a filter
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10019_high.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10017_high.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10011_medium.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10020_medium.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10018_medium.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10018_low.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10014_high.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10015_high.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10013_medium.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10016_low.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10016_medium.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10014_medium.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10012_medium.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10015_medium.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.gzhoudbpb10020_high.paas.oracle.com.svc' on 'scaqan04dv0108' failed
CRS-2675: Stop of 'ora.gzhoudb.pdbgzhou_high.paas.oracle.com.svc' on 'scaqan04dv0108' failed

你可能感兴趣的:(orale,oracle)