As part of data guard configuration, I've installed standby database using Oracle Software only and configured .ora files/folders as required. But while trying to start the listener or check the status in standby, it's throwing the following error.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 61: Unknown error
Then, I tried to start db using pfile and that too shows error as follows.
SQL> startup pfile=C:\app_home\product\11.2.0\dbhome_1\database\initLOCAL2.ora
ORA-12560: TNS:protocol adapter error
As I'm doing this for the first time, I'm very much confused at this stage. How can I resolve this?
Best Answer
Here are the steps I follow when creating a standby for a dataguard environment on windows server, please confirm in comments at which step you currently are to help identify your issue here. (prd1 is the current alive instance, stby1 is the standby instance you're trying to create)
1- install the oracle binaries and patch them to the same level as the live instance without create a database on the stby1's host server
2- On the prd1 instance create a control file for the standby
ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'D:\CONTROL01.CTL';
3- copy the content of %ORACLE_HOME%\database (windows) to the same path from prd1 to stby1
4- use a CMD window to manually create the windows services for the standby database instance
5- Make sure the listener.ora and tnsnames.ora files are configured correctly on both prd1 and stby1
%ORACLE_HOME%\network\admin\tnsnames.ora on both server contains something like
6- %ORACLE_HOME%\network\admin\listener.ora on server1 (prd1) contains
7- listener.ora on stby1 server2 contains something like
8- Once you got all the above settings figured out you go on the stby1 instance and recover the database using SQLPLUS