ORA-16191: Primary log shipping client not logged on standby Hai, this article I will show how to fix error ORA-16191 for datagaurd setup. The following scenario performed on EBS database EBS Version: R12.1.3 Database Version: 11.1.0.7
PRIMARY DB (192.168.1.11) Primary alert log
============================================================================= ================================= Tue Apr 04 13:37:55 2017 Error 1017 received logging on to the standby -----------------------------------------------------------Check that the primary and standby are using a file and remote__file is set to SHARED or EXCLUSIVE, and that the SYS is same in the files. returning error ORA-16191 -----------------------------------------------------------Errors in file /u01/db/tech_st/11.1.0//DELL_rac1/diag/rdbms/dell_live/DELL/trace/DELL_a r_16727.trc: ORA-16191: Primary log shipping client not logged on standby PING[AR]: Heartbeat failed to connect to standby 'DELL_STBY'. Error is 16191. Tue Apr 04 13:42:56 2017 Error 1017 received logging on to the standby -----------------------------------------------------------Check that the primary and standby are using a file and remote__file is set to SHARED or EXCLUSIVE, and that the SYS is same in the files. returning error ORA-16191 -----------------------------------------------------------Errors in file /u01/db/tech_st/11.1.0//DELL_rac1/diag/rdbms/dell_live/DELL/trace/DELL_a r_16727.trc: ORA-16191: Primary log shipping client not logged on standby PING[AR]: Heartbeat failed to connect to standby 'DELL_STBY'. Error is 16191. Tue Apr 04 13:47:28 2017 Stopping background process CJQ0 Tue Apr 04 13:47:56 2017 Error 1034 received logging on to the standby Errors in file /u01/db/tech_st/11.1.0//DELL_rac1/diag/rdbms/dell_live/DELL/trace/DELL_a r_16727.trc: ORA-01034: ORACLE not available PING[AR]: Heartbeat failed to connect to standby 'DELL_STBY'. Error is 1034.
============================================================================= ================================= SQL> SELECT DESTINATION, STATUS, ERROR FROM V$ARCHIVE_DEST WHERE DEST_ID=2; DESTINATION ------------------------------------------------------------------------------STATUS ERROR --------- ----------------------------------------------------------------DELL_STBY ERROR ORA-16191: Primary log shipping client not logged on standby SQL> SQL>
STANDBY DB (192.168.1.12) SQL> select CONTROLFILE_TYPE from v$database; CONTROL ------STANDBY SQL> alter database recover managed standby database disconnect; Database altered. SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL>
Archive Mode Enabled /u01/db/apps_st/arch 0 10 10
Switched Log on Primary database SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL>
Archive Mode Enabled /u01/db/apps_st/arch 0 0 0
Switched Log on Primary database SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL> SQL>
Archive Mode Enabled /u01/db/apps_st/arch 0 0 0
Archive are not Shipping because of error “ORA-16191”
SQL> alter database recover managed standby database cancel; SQL> shut immediate ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oraerp@rac2 dbs]$
SOLUTION:
Recreate file with following parameters on “PRIMARY” & “STANDBY” [oraerp@rac2 dbs]$ rm -rf orapwDELL [oraerp@rac2 dbs]$ orapwd file=orapwDELL =sys entries=100 ignorecase=Y
============================================================================= =================================
Creation of file for PRIMARY DATABASE [oraerp@rac1 dbs]$ rm -rf orapwDELL [oraerp@rac1 dbs]$ orapwd file=orapwDELL =sys entries=100 ignorecase=Y ============================================================================= ================================= [oraerp@rac2 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Tue Apr 4 13:49:08 2017 Copyright (c) 1982, 2008, Oracle.
All rights reserved.
Connected to an idle instance. SQL> startup mount ORACLE instance started. Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers Database mounted. SQL> archive log list; Database log mode Automatic archival
730714112 2163280 419433904 306184192 2932736
bytes bytes bytes bytes bytes
Archive Mode Enabled
Archive destination /u01/db/apps_st/arch Oldest online log sequence 0 Next log sequence to archive 0 Current log sequence 14 SQL> alter database recover managed standby database disconnect; Database altered. SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL>
Archive Mode Enabled /u01/db/apps_st/arch 0 0 14
PRIMARY DB (192.168.1.11) SQL> SELECT DESTINATION, STATUS, ERROR FROM V$ARCHIVE_DEST WHERE DEST_ID=2; DESTINATION ------------------------------------------------------------------------------STATUS ERROR --------- ----------------------------------------------------------------DELL_STBY VALID SQL> alter system switch logfile; System altered.
STANDBY DB (192.168.1.12) SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL>
Archive Mode Enabled /u01/db/apps_st/arch 14 0 15
Switched Log on Primary database SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL>
Archive Mode Enabled /u01/db/apps_st/arch 15 0 16
SQL> select LOG_MODE,FLASHBACK_ON,FORCE_LOGGING from v$database; LOG_MODE
FLASHBACK_ON
FOR
------------ ------------------ --ARCHIVELOG NO YES SQL> SQL> alter database flashback on; Database altered. SQL> select LOG_MODE,FLASHBACK_ON,FORCE_LOGGING from v$database; LOG_MODE FLASHBACK_ON FOR ------------ ------------------ --ARCHIVELOG YES YES SQL>
CONCLUSION: ORA-16191 ISSUE RESOLVED Thanks for Reading. Regards, Mohammed Areefuddin.