ORA-01017: 用户名/口令无效; 登录被拒绝 && ORA-16191: 主日志传送客户机没有登录到备用数据库

ORA-01017: 用户名/口令无效; 登录被拒绝 && ORA-16191: 主日志传送客户机没有登录到备用数据库RDBMS12 1 0 2primary RACstandby norac 在生产系统上搭建 dataguard 完毕后 发现 alert 中有以下告警 Errorsinfile oracle app oracle diag rd

大家好,欢迎来到IT知识分享网。

RDBMS 12.1.0.2

primary : RAC

standby : no rac

在生产系统上搭建dataguard,完毕后,发现alert中有以下告警

Errors in file /oracle/app/oracle/diag/rdbms/orclstdby/orclstdby/trace/orclstdby_arc6_49983.trc: ORA-16191: 主日志传送客户机没有登录到备用数据库 [bgzbcw:oracle][/oracle/app/oracle/product/12.2.0/db_1/dbs]#more /oracle/app/oracle/diag/rdbms/orclstdby/orclstdby/trace/orclstdby_arc6_49983.trc Trace file /oracle/app/oracle/diag/rdbms/orclstdby/orclstdby/trace/orclstdby_arc6_49983.trc Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options ORACLE_HOME = /oracle/app/oracle/product/12.2.0/db_1 System name: Linux Node name: bgzbcw Release: 2.6.32-573.el6.x86_64 Version: #1 SMP Wed Jul 1 18:23:37 EDT 2015 Machine: x86_64 Instance name: orclstdby Redo thread mounted by this instance: 1 Oracle process number: 33 Unix process pid: 49983, image: oracle@bgzbcw (ARC6) * 2020-11-30 14:54:27.546 * SESSION ID:(2269.49980) 2020-11-30 14:54:27.546 * CLIENT ID:() 2020-11-30 14:54:27.546 * SERVICE NAME:() 2020-11-30 14:54:27.546 * MODULE NAME:() 2020-11-30 14:54:27.546 * CLIENT DRIVER:() 2020-11-30 14:54:27.546 * ACTION NAME:() 2020-11-30 14:54:27.546 krso_proc_start_arch: Return - another process starting ARCH processes * 2020-11-30 14:54:28.567 OCISessionBegin failed. Error -1 .. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: 用户名/口令无效; 登录被拒绝 ' * 2020-11-30 14:54:29.595 OCISessionBegin failed. Error -1 .. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: 用户名/口令无效; 登录被拒绝 ' ORA-01017: 用户名/口令无效; 登录被拒绝 OCI_DBVER attribute value retrieval failed error=1017 * 2020-11-30 14:54:30.660 OCISessionBegin failed. Error -1 .. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: 用户名/口令无效; 登录被拒绝 ' * 2020-11-30 14:54:30. 4929 krsh.c Error 1017 received logging on to the standby ------------------------------------------------------------ Check that the primary and standby are using a password file and remote_login_passwordfile is set to SHARED or EXCLUSIVE, and that the SYS password is same in the password files. returning error ORA-16191 ------------------------------------------------------------ * 2020-11-30 14:54:30. 4929 krsh.c FAL[client, ARC6]: Error 16191 connecting to ORCLSTDBY for fetching gap sequence ORA-16191: 主日志传送客户机没有登录到备用数据库 [bgzbcw:oracle][/oracle/app/oracle/product/12.2.0/db_1/dbs]#

关于这个密码口令问题,其实可以通过sys账号登录oracle,查看是否能登录,如果不能登录,说明sys密码被修改了。密码文件没有同步过来。

处理方式:

1  使用orapwd重新生成密码文件(如果知道密码的话)

2 从主库上copy出来密码文件

关于从主库上copy出来密码文件,说明下。12c的rac,密码文件是放在asm上的。而且会有多个密码文件,但是那个是最新的呢,可以通过命令获取。如下:

ASMCMD> pwget --dbuniquename orcl +DATA/ORCL/PASSWORD/pwdorcl.280. ASMCMD> ASMCMD> cd password ASMCMD> ls -l Type Redund Striped Time Sys Name PASSWORD UNPROT COARSE SEP 09 15:00:00 Y pwdorcl.256. PASSWORD UNPROT COARSE SEP 09 16:00:00 Y pwdorcl.265. PASSWORD UNPROT COARSE SEP 09 16:00:00 Y pwdorcl.280. ASMCMD> pwd +data/orcl/password ASMCMD> 

然后将,密码文件copy到备库,修改下名字就可以了。

我这里犯了错误,还好后来发现了。犯的错误是,看着ASM上的密码文件名字,把密码文件名称搞错了。正确的,应该是orapw*开头的,直接修改成了pwd*. 所以还是不识别密码文件

(之前踩过的坑,密码文件的权限不对,也不行)。修改未orapw*格式后,正常了。算是犯了一个小小的低级错误。

-- asm上的文件命名不一样 [bgzbcw:oracle][/oracle/app/oracle/product/12.2.0/db_1/dbs]#ll total 18748 -rw-rw----. 1 oracle dba 1544 Nov 30 15:10 hc_orclstdby.dat -rw-r--r--. 1 oracle dba 2992 Feb 3 2012 init.ora -rw-r-----. 1 oracle dba 24 Nov 30 13:24 lkORCLSTDBY -rw-r-----. 1 oracle dba 53760 Nov 30 15:07 orapworclstdby -rw-r-----. 1 oracle dba 7680 Nov 30 13:10 pwdorcl.280. -rw-r-----. 1 oracle dba 7680 Nov 30 14:24 pwdorclstdby_260 -rw-r-----. 1 oracle dba 7680 Nov 30 13:11 pwdorclstdby_280 -rw-r-----. 1 oracle dba 7680 Nov 30 14:53 pwdorclstdby_bak -rw-r-----. 1 oracle dba  Nov 30 13:31 snapcf_orclstdby.f -rw-r-----. 1 oracle dba 4608 Nov 30 15:10 spfileorclstdby.ora [bgzbcw:oracle][/oracle/app/oracle/product/12.2.0/db_1/dbs]#

补充:

今天在搭建dg的时候,发现可以open 库。但是media recover,既没有gap,也获取不到归档日志。后来检查对比主备库上的v$archived_log中的applied,来确认缺少那个归档,copy出来,register后,就可以了。(因为我的控制文件比备份新的多,备份是使用凌晨的备份。控制文件是创建备库的时候,重新创建的)

 

END

— 2020-12-03 add

[oracle@asm12c ~]$ oerr opw 00013 13, 1, "Specify either dbuniquename or asm to create password file in Automatic Storage Management disk groups" [oracle@asm12c ~]$ orapwd FILE='+data/test/password/orapwtest' dbuniquename=test INPUT_FILE='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/orapwtest' FORCE=y [oracle@asm12c ~]$ orapwd FILE='+data/test/password/orapwtest' dbuniquename=test INPUT_FILE='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/orapwtest' FORCE=y [oracle@asm12c ~]$ 

— 查看生成的密码文件 

ASMCMD> ls orapwtest pwdtest.270. ASMCMD> pwget --dbuniquename test +DATA/test/password/orapwtest ASMCMD> 

END 

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/152101.html

(0)
上一篇 2025-03-10 14:00
下一篇 2025-03-10 14:05

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信