Tag Archives: Oracle reports an error

【ORA】Error 1031 received logging on to the standby

[ORA] Error 1031 Received logging on to the standby

Scene:
When building Windows Server 2008 R2 single-instance DG connected to Linux RAC (11.2.0.3), an error was reported on node 2:
Error 1031 received logging on to the standby

Solution:
The password file will be the same if you use Oracle as the password, but it turns out that you still need to recreate the password file, and the password file will be identical in all three places.

orapwd file=orapworcl password=oracle;
generated the password file; So just copy the password file from node 1 to node 2 and DG (change the file name to PWD instance name.ora, in this case pwdorcl.ora). If you check the alter log and it still gives an error, you need to redistribute and cancel the log application before starting the application log.
*** stop redo logging application
SQL> alter database recover managed standby database cancel;

*** open real-time logging application
SQL> alter database recover managed standby database using current logfile disconnect;

TNS-12545: Connect failed because target host or object does not exist

TNS-12545: Connect failed because target host or object does not exist

Scenario: Change the Linux host name, restart the machine, and start listening for errors
$ lsnrctl start
LSNRCTL for Linux: Version 12.1.0.2.0-production on 26-jul-2017 09:53:42
Copyright (c) 1991, 2014,
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP))(PORT=1521)))
nss-12545: Connect failed because target host or object does not exist
tns-12560: TNS:protocol adapter error
tns-00515: Connect failed because target host or object does not exist
Linux error: 111: Connection container to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
……

solution:
because only the hostname of the machine is changed, but the host and listlisteners. Ora files are not changed. Ora
modify the host file
$vi /etc/hosts
#127.0.0.1 localhost localhost4 localhost4. Localdomain4
#::1 localhost localhost.localdomain Localhost6 localhost6. Localdomain6
127.0.0.1 localhost MWDS
192.168.78.17 meng

modify the listener.
$vi ora file/u01/app/oracle/product/12.1/db1/network/admin/listener. Ora.
# listener ora Network Configuration File:/u01/app/oracle/product/12.1/db1/network/admin/listener. Ora
# Generated by oracle configuration tools.

the listener =
(DESCRIPTION_LIST =
(the DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = meng)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

restart the machine
# reboot

The HOST for tnsnames.ora on the machine also needs to be changed, but the IP address is recommended for this file.