GRID_HOME = /oracle/app/11.2.0/grid
DB_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1/
Primary Database = primsid
Primary SERVICE_NAME = PRIMARYSVC
Data Guard database instance name = DGSID
Data Guard database unique name = primsiddg
Data Guard SERVICE_NAME = DGSVC
What I wanted:
I wanted to create static listener for my Data Guard database, because I wanted to create the Data Guard -database from using the 'Active duplicate' -mode. This requires the standby database can be connected using listener connection even though the database is in NOMOUNT -state.
How to achieve this;
1) Do no create listener.ora in the GRID_HOME. Leave it empty.
2) Create listener.ora in the DB_HOME. These are my settings. Please note ORACLE_HOME and ADR_BASE_LISTENER - values.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DGSVC)
(ORACLE_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DGSID)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dg-server.domain.com)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /oracle/app/oracle/product/11.2.0/dbhome_1
3) Start the listener GRID_HOME with grid environment variables on
4) Check listener status
oracle@dg-server:/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin$ listener status
LSNRCTL for Solaris: Version 11.2.0.4.0 - Production on 14-DEC-2014 17:34:58
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dg-server.domain.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Solaris: Version 11.2.0.4.0 - Production
Start Date 14-DEC-2014 17:33:42
Uptime 0 days 0 hr. 1 min. 15 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /oracle/app/oracle/product/11.2.0/dbhome_1/diag/tnslsnr/dg-server/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dg-server)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "DGSVC" has 2 instance(s).
Instance "DGSID", status UNKNOWN, has 1 handler(s) for this service...
Instance "DGSID", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
In case you see double services like this "BLOCKED" -- check your local_listener -value at database and clear the value.
SQL> alter system set local_listener = '';
Jarjestelma on muutettu.
SQL> alter system register;
Jarjestelma on muutettu.
Jarjestelma on muutettu.
SQL> alter system register;
Jarjestelma on muutettu.
6) Start database with pfile on nomout -state
SQL> startup nomount pfile = 'initPRIMSID.ora';
ORACLE instance started.
Total System Global Area 6415736832 bytes
Fixed Size 2239440 bytes
Variable Size 1136661552 bytes
Database Buffers 5272240128 bytes
Redo Buffers 4595712 bytes
7) Restore controlfiles
RMAN> restore controlfile from 'PRIMSID_stby.ctl';
oracle@dg-server:/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin$ rman TARGET sys/pw@PRIMARYSVC AUXILIARY sys/pw@DGSVC
Recovery Manager: Release 11.2.0.4.0 - Production on Sun Dec 14 17:46:34 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: PRIMSID (DBID=1185966409)
connected to auxiliary database: DGSID (not mounted)
No comments:
Post a Comment