Setup oracle physical standby with active dataguard using 11.2.0, just to let you know that it was not an easy journey to reach here. But finally got there.
My configurations are:
Primary site:
Two RAC Nodes : rac1.localdomain and rac2.localdomain
Standby Site:
one node : racdr1.localdomain
Database details:
Database name db_name: RAC
Primany db_unique_name: RAC
Standby db_unique_name: RAC_STBY
Primany instances: RAC1, RAC2
Primany ASM: +ASM1, +ASM2
Standby instance: RAC_STBY1
Standby instance: +ASM1
Recover catalog machine: rcat1.localdomain
My understanding of dataguard: To make it simple and easily understandable , dataguard is createing new db_unique_name database and keeping the same db_name but running in different open_mode.
Steps to create the physical standby :
1. Make sure primary is running in archive log mode and have force logging turned on.
2. Get the db_name and db_unique_name from primary
3. Setup log_archive_config on primary with the db_unique_name of primary and standby exp: DG_CONFIG=(RAC,RAC_STBY)
4. Setup remove archive log destination exp: SERVICE=rac_stby NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC_STBY
5. Enable the log_achive_dest_state_2 exp: alter system set log_archive_dest_state_2=ENABLE;
6. Check log_archive_format, log_archive_max_processes, remote_login_passwordfile is EXCLUSIVE, fal_server to standby DB_unique_name, standby_file_management to Auto and db_file_name_convert to +DATA/rac_stby, +DATA/rac and log_file_name_convert to +FRA/rac_stby, +FRA/rac, +DATA/rac_stby, +DATA/rac
7. Setup Service and TNS on PRIMARY and STANDBY
8. nslookup for scan on primary and scandr on standby to see if getting the IPs
9. Create standby redo log on PRIMARY
10. Configure status listener and static scan listener on PRIMARY and STANDBY
11. Restart listener, scan Listaner on PRIMARY and STANDBY
12. Copy the password file on to standby machine and rename it to orapw<SID> exp: orapwRAC_STBY1 , SID is the instance number.
13. On STANDBY SETUP initRAC_STBY1.ora file with only one parameter as *.db_name=RAC and use this file to stratup nomount instance (startup nomount pfile='?/dbs/initRAC_STBY1.ora')
14. From PRIMARY use RMAN to connect target as primary and auxiliary as remote STANDBY database. exp: rman target / auxiliary sys/***********@rac_stby
15. Using RMAN Duplicate database for standby from active database.
16. Create pfile from spfile exp: create pfile='/home/oracle/stbypfile.ora' from spfile;
17. Modify pfile and put entries for STANDBY instance, try using uppercase to avoid confussion. Make sure you have instance number and thread in there.
18. Shutdown STANDBY database and startup mount using this new pfile exp: startup mount pfile='/home/oracle/stbypfile.ora';
19. Create spfile from pfile exp: create spfile='+DATA/rac_stby/parameterfile/spfilerac_stby.ora' from pfile='/home/oracle/stbypfile.ora';
20. As this is ASM location for spfile so go to $ORACLE_HOME/dbs and create new init file for instance and put location of spfile under asm
21. Remove any old spfile from $ORACLE_HOME/dbs on STANDBY
22. Add database and instance under srvctl.
23. To enable online redo application recover already read only STANDBY database using SQL> alter database recover managed standby database using current logfile disconnect; this will change the open_mode to READ ONLY WITH APPLY
24. Have a break and drink coffee.
Below are the steps that I performed to create the active dataguard
On Primary Database
[oracle@rac1 ~]$ sqlplus "/ as sysdba"
set pages 10000 lines 270 long 10000
archive log list
SQL*Plus: Release 11.2.0 Production on Wed Feb 19 14:53:18 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 168
Next log sequence to archive 169
Current log sequence 169
SQL> SELECT force_logging FROM v$database;
FOR
---
YES
SQL>
SQL> !hostname
rac1.localdomain
SQL> !date
Wed Feb 19 14:56:32 EST 2014
SQL>
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 168
Next log sequence to archive 169
Current log sequence 169
SQL> select force_logging from v$database;
FOR
---
YES
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string RAC
SQL> show parameter db_unique_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_unique_name string RAC
SQL> show parameter log_archive_config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(RAC,RAC_STBY)
SQL>
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=rac_stby NOAFFIRM ASYN
C VALID_FOR=(ONLINE_LOGFILES,P
RIMARY_ROLE) DB_UNIQUE_NAME=RA
C_STBY
SQL> alter system set log_archive_dest_state_2=ENABLE;
System altered.
SQL> show parameter log_archive_format
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%s_%r.arc
SQL> show parameter log_archive_max_process
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_max_processes integer 30
SQL> show parameter remote_login_pass
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
SQL>
SQL> show parameter fal_server
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fal_server string RAC_STBY
SQL> show parameter standby_file_ma
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_file_management string AUTO
SQL>
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cd /u01/app/oracle/product/11.2.0/db_1/network/admin/
[oracle@rac1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.localdomain)
)
)
RAC_STBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = scandr)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC_STBY.localdomain)
)
)
RCAT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rcat1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RCAT1.localdomain)
)
)
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ nslookup scan
Server: 192.168.56.150
Address: 192.168.56.150#53
Name: scan.localdomain
Address: 192.168.56.106
Name: scan.localdomain
Address: 192.168.56.107
Name: scan.localdomain
Address: 192.168.56.105
[oracle@rac1 admin]$
[oracle@rac1 admin]$ nslookup scandr
Server: 192.168.56.150
Address: 192.168.56.150#53
Name: scandr.localdomain
Address: 192.168.56.115
Name: scandr.localdomain
Address: 192.168.56.116
Name: scandr.localdomain
Address: 192.168.56.117
Just to verify that I can connect to Recovery catalog from primary
[oracle@rac1 admin]$ sqlplus catowner/***********@rcat
SQL*Plus: Release 11.2.0 Production on Wed Feb 19 15:19:13 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> define
DEFINE _DATE = "19-FEB-14" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "rcat" (CHAR)
DEFINE _USER = "CATOWNER" (CHAR)
DEFINE _PRIVILEGE = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
DEFINE _EDITOR = "ed" (CHAR)
DEFINE _O_VERSION = "Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE = "1102000300" (CHAR)
SQL> show user
USER is "CATOWNER"
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rac1 admin]$
[oracle@rac1 admin]$ ps -ef | grep smon
oracle 3323 1 0 12:26 ? 00:00:00 asm_smon_+ASM1
oracle 3835 1 0 12:27 ? 00:00:00 ora_smon_RAC1
root 4038 1 2 12:28 ? 00:03:33 /u01/app/11.2.0/grid/bin/osysmond.bin
oracle 13191 7425 0 15:20 pts/3 00:00:00 grep smon
[oracle@rac1 admin]$
[oracle@rac1 admin]$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0 Production on Wed Feb 19 16:01:25 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
set pages 10000 lines 270 long 10000
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select * from v$logfile where type='STANDBY';
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- ------------------------------------------------------------ ---
5 STANDBY +DATA/rac/onlinelog/group_5.272.839950691 NO
5 STANDBY +FRA/rac/onlinelog/group_5.346.839950693 YES
6 STANDBY +DATA/rac/onlinelog/group_6.273.839950735 NO
6 STANDBY +FRA/rac/onlinelog/group_6.348.839950743 YES
7 STANDBY +DATA/rac/onlinelog/group_7.274.839950751 NO
7 STANDBY +FRA/rac/onlinelog/group_7.350.839950755 YES
10 STANDBY +DATA/rac/onlinelog/group_10.277.839950819 NO
10 STANDBY +FRA/rac/onlinelog/group_10.356.839950823 YES
11 STANDBY +DATA/rac/onlinelog/group_11.278.839950839 NO
11 STANDBY +FRA/rac/onlinelog/group_11.355.839950857 YES
12 STANDBY +DATA/rac/onlinelog/group_12.279.839950929 NO
12 STANDBY +FRA/rac/onlinelog/group_12.358.839950939 YES
12 rows selected.
SQL> select * from v$standby_log;
GROUP# DBID THREAD# SEQUENCE# BYTES BLOCKSIZE USED ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME LAST_CHANGE# LAST_TIME
---------- ---------------------------------------- ---------- ---------- ---------- ---------- ---------- --- ---------- ------------- --------- ------------ --------- ------------ ---------
5 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED
6 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED
7 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED
10 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED
11 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED
12 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED
6 rows selected.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
1 1 169 52428800 512 1 YES INACTIVE 9079172 19-FEB-14 9111459 19-FEB-14
2 1 170 52428800 512 1 NO CURRENT 9111459 19-FEB-14 2.8147E+14
3 2 119 52428800 512 1 NO CURRENT 9111411 19-FEB-14 2.8147E+14
4 2 118 52428800 512 1 YES INACTIVE 9078218 19-FEB-14 9111411 19-FEB-14
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ srvctl config listener
Name: LISTENER
Network: 1, Owner: oracle
Home: <CRS home>
End points: TCP:1521
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ cd /u01/app/11.2.0/grid/network/admin/
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ cat listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC.localdomain)
(SID_NAME = RAC1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC.localdomain)
(SID_NAME = RAC1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN2 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC.localdomain)
(SID_NAME = RAC1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC.localdomain)
(SID_NAME = RAC1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
[oracle@rac1 admin]$
[oracle@rac1 admin]$ ssh rac2
Last login: Tue Jul 30 12:58:12 2013 from rac1.localdomain
[oracle@rac2 ~]$ cd /u01/app/11.2.0/grid/network/admin/
[oracle@rac2 admin]$
[oracle@rac2 admin]$
[oracle@rac2 admin]$ cat listener.ora
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON # line added by Agent
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC.localdomain)
(SID_NAME = RAC2)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC.localdomain)
(SID_NAME = RAC2)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN2 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC.localdomain)
(SID_NAME = RAC2)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC.localdomain)
(SID_NAME = RAC2)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
[oracle@rac2 admin]$
[oracle@rac2 admin]$ ssh racdr1
The authenticity of host 'racdr1 (192.168.56.111)' can't be established.
RSA key fingerprint is 26:5f:ff:55:dc:ad:13:0a:a1:a2:a2:28:d2:da:2a:2e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'racdr1,192.168.56.111' (RSA) to the list of known hosts.
oracle@racdr1's password:
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ cd /u01/app/11.2.0/grid/network/admin/
[oracle@racdr1 admin]$ cat listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC_STBY.localdomain)
(SID_NAME = RAC_STBY1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC_STBY.localdomain)
(SID_NAME = RAC_STBY1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN2 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC_STBY.localdomain)
(SID_NAME = RAC_STBY1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
SID_LIST_LISTENER_SCAN3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = RAC_STBY.localdomain)
(SID_NAME = RAC_STBY1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
[oracle@racdr1 admin]$
BACK ON PRIMARY
[oracle@racdr1 ~]$ . ./db_env
[oracle@racdr1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): racdr1
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ srvctl config listener
Name: LISTENER
Network: 1, Owner: oracle
Home: <CRS home>
End points: TCP:1521
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ srvctl stop listener -n racdr1
[oracle@racdr1 ~]$ srvctl start listener -n racdr1
[oracle@racdr1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): racdr1
[oracle@racdr1 ~]$ srvctl config listener
Name: LISTENER
Network: 1, Owner: oracle
Home: <CRS home>
End points: TCP:1521
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ srvctl stop scan_listener
[oracle@racdr1 ~]$ srvctl start scan_listener
[oracle@racdr1 ~]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0 - Production on 19-FEB-2014 17:13:14
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0 - Production
Start Date 19-FEB-2014 17:03:26
Uptime 0 days 0 hr. 9 min. 48 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/racdr1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.111)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.113)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "RAC_STBY.localdomain" has 2 instance(s).
Instance "RAC_STBY1", status UNKNOWN, has 1 handler(s) for this service...
Instance "RAC_STBY1", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@racdr1 ~]$
ON PRIMARY
[oracle@rac1 admin]$ hostname
rac1.localdomain
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ srvctl stop listener -n rac1
[oracle@rac1 admin]$ srvctl start listener -n rac1
[oracle@rac1 admin]$ srvctl stop scan_listener
[oracle@rac1 admin]$ srvctl start scan_listener
[oracle@rac1 admin]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0 - Production on 19-FEB-2014 16:25:47
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0 - Production
Start Date 19-FEB-2014 16:24:56
Uptime 0 days 0 hr. 0 min. 50 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.101)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.103)(PORT=1521)))
Services Summary...
Service "RAC.localdomain" has 1 instance(s).
Instance "RAC1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ ssh rac2
Last login: Wed Feb 19 16:17:12 2014 from rac1.localdomain
[oracle@rac2 ~]$ . ./db_env
[oracle@rac2 ~]$ lsrnctl status listener
-bash: lsrnctl: command not found
[oracle@rac2 ~]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0 - Production on 19-FEB-2014 16:26:13
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0 - Production
Start Date 19-FEB-2014 12:28:28
Uptime 0 days 3 hr. 57 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/rac2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.102)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.104)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "RAC.localdomain" has 1 instance(s).
Instance "RAC2", status READY, has 1 handler(s) for this service...
Service "RACXDB.localdomain" has 1 instance(s).
Instance "RAC2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac2 ~]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ sqlplus "/ as sysdba"
set pages 10000 lines 270 long 10000
SQL*Plus: Release 11.2.0 Production on Wed Feb 19 16:37:14 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> SQL>
SQL> create pfile='/home/oracle/primaryinitpfile.ora' from spfile;
File created.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ cat /home/oracle/primaryinitpfile.ora
RAC1.__db_cache_size=327155712
RAC2.__db_cache_size=423624704
RAC1.__java_pool_size=4194304
RAC2.__java_pool_size=4194304
RAC1.__large_pool_size=4194304
RAC2.__large_pool_size=4194304
RAC2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
RAC1.__pga_aggregate_target=264241152
RAC2.__pga_aggregate_target=264241152
RAC1.__sga_target=796917760
RAC2.__sga_target=796917760
RAC1.__shared_io_pool_size=0
RAC2.__shared_io_pool_size=0
RAC1.__shared_pool_size=452984832
RAC2.__shared_pool_size=356515840
RAC1.__streams_pool_size=0
RAC2.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/RAC/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/rac/controlfile/current.260.822663049'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain='localdomain'
*.db_file_name_convert='RAC_STBY','RAC'
*.db_name='RAC'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=12884901888
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=RACXDB)'
*.fal_server='RAC_STBY'
RAC1.instance_number=1
RAC2.instance_number=2
*.log_archive_config='DG_CONFIG=(RAC,RAC_STBY)'
*.log_archive_dest_2='SERVICE=rac_stby NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC_STBY'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.log_file_name_convert='RAC_STBY','RAC'
*.open_cursors=300
*.pga_aggregate_target=264241152
*.processes=150
*.remote_listener='scan:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=793772032
*.standby_file_management='AUTO'
RAC2.thread=2
RAC1.thread=1
RAC2.undo_tablespace='UNDOTBS2'
RAC1.undo_tablespace='UNDOTBS1'
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ sqlplus "/ as sysdba"
set pages 10000 lines 270 long 10000
SQL*Plus: Release 11.2.0 Production on Wed Feb 19 16:46:30 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> SQL>
SQL> show parameter db_uni
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_unique_name string RAC
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ srvctl config scan
SCAN name: scan, Network: 1/192.168.56.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /scan/192.168.56.107
SCAN VIP name: scan2, IP: /scan/192.168.56.105
SCAN VIP name: scan3, IP: /scan/192.168.56.106
[oracle@rac1 admin]$ ssh racdr1
oracle@racdr1's password:
Last login: Wed Feb 19 16:35:12 2014 from rac2.localdomain
[oracle@racdr1 ~]$ srvctl config scan
SCAN name: scandr, Network: 1/192.168.56.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /scandr/192.168.56.117
SCAN VIP name: scan2, IP: /scandr/192.168.56.115
SCAN VIP name: scan3, IP: /scandr/192.168.56.116
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ exit
logout
Connection to racdr1 closed.
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ cd $ORACLE_HOME/dbs
[oracle@rac1 dbs]$ ls -lah
total 19M
drwxr-xr-x. 2 oracle oinstall 4.0K Feb 19 12:27 .
drwxr-xr-x. 76 oracle oinstall 4.0K Aug 5 2013 ..
-rw-rw----. 1 oracle dba 1.6K Feb 19 12:29 hc_RAC1.dat
-rw-r--r--. 1 oracle oinstall 2.8K May 15 2009 init.ora
-rw-r-----. 1 oracle oinstall 33 Aug 5 2013 initRAC1.ora
-rw-r-----. 1 oracle oinstall 1.5K Aug 5 2013 orapwRAC1
-rw-r-----. 1 oracle dba 19M Feb 19 16:03 snapcf_RAC1.f
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ pwd
/u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ scp orapwRAC1 racdr1:/u01/app/oracle/product/11.2.0/db_1/dbs/
oracle@racdr1's password:
orapwRAC1 100% 1536 1.5KB/s 00:00
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ ssh racdr1
oracle@racdr1's password:
Last login: Wed Feb 19 16:55:06 2014 from rac1.localdomain
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ cd /u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@racdr1 dbs]$ ls -la
total 28
drwxr-xr-x. 2 oracle oinstall 4096 Aug 23 16:16 .
drwxrwxr-x. 73 oracle oinstall 4096 Aug 14 2013 ..
-rw-rw----. 1 oracle oinstall 1544 Aug 23 16:15 hc_RAC1.dat
-rw-rw----. 1 oracle oinstall 1544 Aug 23 16:06 hc_RAC_STBY1.dat
-rw-r--r--. 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r--. 1 oracle oinstall 1649 Aug 23 14:19 initRAC_stby.ora
-rw-r-----. 1 oracle oinstall 1536 Feb 19 16:56 orapwRAC1
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$ mv orapwRAC1 orapwRAC_STBY1
[oracle@racdr1 dbs]$ cat initRAC_stby.ora
RAC1.__db_cache_size=478150656
RAC2.__db_cache_size=503316480
RAC1.__java_pool_size=4194304
RAC2.__java_pool_size=4194304
RAC1.__large_pool_size=4194304
RAC2.__large_pool_size=4194304
RAC1.__pga_aggregate_target=264241152
RAC2.__pga_aggregate_target=264241152
RAC1.__sga_target=796917760
RAC2.__sga_target=796917760
RAC1.__shared_io_pool_size=0
RAC2.__shared_io_pool_size=0
RAC1.__shared_pool_size=301989888
RAC2.__shared_pool_size=276824064
RAC1.__streams_pool_size=0
RAC2.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/RAC/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/rac/controlfile/current.260.822663049'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain='localdomain'
*.db_file_name_convert='RAC_STBY','RAC'
*.db_name='RAC'
*.db_unique_name='RAC_STBY'
*.db_recovery_file_dest_size=10737418240
*.db_recovery_file_dest='+FRA'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=RACXDB)'
*.fal_server='RAC'
RAC1.instance_number=1
RAC2.instance_number=2
*.log_archive_config='DG_CONFIG=(RAC,RAC_STBY)'
*.log_archive_dest_2='SERVICE=rac NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.log_file_name_convert='RAC_STBY','RAC'
*.open_cursors=300
*.pga_aggregate_target=264241152
*.processes=150
*.remote_listener='scan:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=793772032
*.standby_file_management='AUTO'
RAC2.thread=2
RAC1.thread=1
RAC2.undo_tablespace='UNDOTBS2'
RAC1.undo_tablespace='UNDOTBS1'
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$
SETUP initRAC_STBY1.ora file with only one parameter as *.db_name=RAC and use this file to stratup nomount instance
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ ORACLE_SID=RAC_STBY1
[oracle@racdr1 ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0 Production on Wed Feb 19 17:01:20 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='?/dbs/initRAC_STBY1.ora'
ORACLE instance started.
Total System Global Area 793350144 bytes
Fixed Size 2232552 bytes
Variable Size 285216536 bytes
Database Buffers 503316480 bytes
Redo Buffers 2584576 bytes
SQL>
SQL>
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
ON PRIMARY
[oracle@rac1 admin]$ rman target / auxiliary sys/***********@rac_stby
Recovery Manager: Release 11.2.0 - Production on Wed Feb 19 18:53:45 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: RAC (DBID=2410645064)
connected to auxiliary database: RAC (not mounted)
RMAN> DUPLICATE TARGET DATABASE
2> FOR STANDBY
3> FROM ACTIVE DATABASE
4> DORECOVER
5> SPFILE
6> set audit_file_dest='/u01/app/oracle/admin/rac_stby/adump'
7> SET db_unique_name='RAC_STBY' COMMENT 'Is standby'
8> SET LOG_ARCHIVE_DEST_2='SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'
9> SET FAL_SERVER='RAC' COMMENT 'Is primary'
10> SET instance_number='1'
11> NOFILENAMECHECK;
Starting Duplicate Db at 19-FEB-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=25 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwRAC1' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapwRAC_STBY1' targetfile
'+DATA/rac/spfilerac.ora' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/spfileRAC_STBY1.ora' ;
sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileRAC_STBY1.ora''";
}
executing Memory Script
Starting backup at 19-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=99 instance=RAC1 device type=DISK
Finished backup at 19-FEB-14
sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileRAC_STBY1.ora''
contents of Memory Script:
{
sql clone "alter system set audit_file_dest =
''/u01/app/oracle/admin/rac_stby/adump'' comment=
'''' scope=spfile";
sql clone "alter system set db_unique_name =
''RAC_STBY'' comment=
''Is standby'' scope=spfile";
sql clone "alter system set LOG_ARCHIVE_DEST_2 =
''SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'' comment=
'''' scope=spfile";
sql clone "alter system set FAL_SERVER =
''RAC'' comment=
''Is primary'' scope=spfile";
sql clone "alter system set instance_number =
1 comment=
'''' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set audit_file_dest = ''/u01/app/oracle/admin/rac_stby/adump'' comment= '''' scope=spfile
sql statement: alter system set db_unique_name = ''RAC_STBY'' comment= ''Is standby'' scope=spfile
sql statement: alter system set LOG_ARCHIVE_DEST_2 = ''SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'' comment= '''' scope=spfile
sql statement: alter system set FAL_SERVER = ''RAC'' comment= ''Is primary'' scope=spfile
sql statement: alter system set instance_number = 1 comment= '''' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 793350144 bytes
Fixed Size 2232552 bytes
Variable Size 285216536 bytes
Database Buffers 503316480 bytes
Redo Buffers 2584576 bytes
contents of Memory Script:
{
sql clone "alter system set control_files =
''+DATA/rac_stby/controlfile/current.256.839962459'' comment=
''Set by RMAN'' scope=spfile";
backup as copy current controlfile for standby auxiliary format '+DATA/rac_stby/controlfile/current.257.839962459';
sql clone "alter system set control_files =
''+DATA/rac_stby/controlfile/current.257.839962459'' comment=
''Set by RMAN'' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set control_files = ''+DATA/rac_stby/controlfile/current.256.839962459'' comment= ''Set by RMAN'' scope=spfile
Starting backup at 19-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_RAC1.f tag=TAG20140219T185419 RECID=2 STAMP=839962461
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 19-FEB-14
sql statement: alter system set control_files = ''+DATA/rac_stby/controlfile/current.257.839962459'' comment= ''Set by RMAN'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 793350144 bytes
Fixed Size 2232552 bytes
Variable Size 285216536 bytes
Database Buffers 503316480 bytes
Redo Buffers 2584576 bytes
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
RMAN-05538: WARNING: implicitly using DB_FILE_NAME_CONVERT
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
contents of Memory Script:
{
set newname for tempfile 1 to
"+data";
switch clone tempfile all;
set newname for datafile 1 to
"+data";
set newname for datafile 2 to
"+data";
set newname for datafile 3 to
"+data";
set newname for datafile 4 to
"+data";
set newname for datafile 5 to
"+data";
set newname for datafile 6 to
"+data";
backup as copy reuse
datafile 1 auxiliary format
"+data" datafile
2 auxiliary format
"+data" datafile
3 auxiliary format
"+data" datafile
4 auxiliary format
"+data" datafile
5 auxiliary format
"+data" datafile
6 auxiliary format
"+data" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to +data in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 19-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA/rac/datafile/sysaux.257.822662979
output file name=+DATA/rac_stby/datafile/sysaux.258.839962513 tag=TAG20140219T185510
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:36
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/rac/datafile/system.256.822662979
output file name=+DATA/rac_stby/datafile/system.259.839962607 tag=TAG20140219T185510
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA/rac/datafile/example.264.822663075
output file name=+DATA/rac_stby/datafile/example.260.839962673 tag=TAG20140219T185510
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA/rac/datafile/undotbs1.258.822662979
output file name=+DATA/rac_stby/datafile/undotbs1.261.839962707 tag=TAG20140219T185510
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=+DATA/rac/datafile/undotbs2.265.822663197
output file name=+DATA/rac_stby/datafile/undotbs2.262.839962743 tag=TAG20140219T185510
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/rac/datafile/users.259.822662979
output file name=+DATA/rac_stby/datafile/users.263.839962793 tag=TAG20140219T185510
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 19-FEB-14
sql statement: alter system archive log current
contents of Memory Script:
{
backup as copy reuse
archivelog like "+FRA/rac/archivelog/2014_02_19/thread_1_seq_169.341.839948803" auxiliary format
"+FRA" archivelog like
"+FRA/rac/archivelog/2014_02_19/thread_1_seq_170.360.839962797" auxiliary format
"+FRA" archivelog like
"+FRA/rac/archivelog/2014_02_19/thread_2_seq_119.259.839962829" auxiliary format
"+FRA" ;
catalog clone start with "+FRA";
switch clone datafile all;
}
executing Memory Script
Starting backup at 19-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=169 RECID=272 STAMP=839948830
output file name=+FRA/rac_stby/archivelog/2014_02_19/thread_1_seq_169.256.839962837 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=170 RECID=274 STAMP=839962820
output file name=+FRA/rac_stby/archivelog/2014_02_19/thread_1_seq_170.257.839962841 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=119 RECID=275 STAMP=839962833
output file name=+FRA/rac_stby/archivelog/2014_02_19/thread_2_seq_119.258.839962855 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03
Finished backup at 19-FEB-14
searching for all files that match the pattern +FRA
List of Files Unknown to the Database
=====================================
File Name: +fra/RAC_STBY/ARCHIVELOG/2014_02_19/thread_1_seq_169.256.839962837
File Name: +fra/RAC_STBY/ARCHIVELOG/2014_02_19/thread_1_seq_170.257.839962841
File Name: +fra/RAC_STBY/ARCHIVELOG/2014_02_19/thread_2_seq_119.258.839962855
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: +fra/RAC_STBY/ARCHIVELOG/2014_02_19/thread_1_seq_169.256.839962837
File Name: +fra/RAC_STBY/ARCHIVELOG/2014_02_19/thread_1_seq_170.257.839962841
File Name: +fra/RAC_STBY/ARCHIVELOG/2014_02_19/thread_2_seq_119.258.839962855
datafile 1 switched to datafile copy
input datafile copy RECID=2 STAMP=839962863 file name=+DATA/rac_stby/datafile/system.259.839962607
datafile 2 switched to datafile copy
input datafile copy RECID=3 STAMP=839962864 file name=+DATA/rac_stby/datafile/sysaux.258.839962513
datafile 3 switched to datafile copy
input datafile copy RECID=4 STAMP=839962864 file name=+DATA/rac_stby/datafile/undotbs1.261.839962707
datafile 4 switched to datafile copy
input datafile copy RECID=5 STAMP=839962864 file name=+DATA/rac_stby/datafile/users.263.839962793
datafile 5 switched to datafile copy
input datafile copy RECID=6 STAMP=839962864 file name=+DATA/rac_stby/datafile/example.260.839962673
datafile 6 switched to datafile copy
input datafile copy RECID=7 STAMP=839962864 file name=+DATA/rac_stby/datafile/undotbs2.262.839962743
contents of Memory Script:
{
set until scn 9150034;
recover
standby
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 19-FEB-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=31 instance=RAC_STBY1 device type=DISK
starting media recovery
archived log for thread 1 with sequence 170 is already on disk as file +FRA/rac_stby/archivelog/2014_02_19/thread_1_seq_170.257.839962841
archived log for thread 2 with sequence 119 is already on disk as file +FRA/rac_stby/archivelog/2014_02_19/thread_2_seq_119.258.839962855
archived log file name=+FRA/rac_stby/archivelog/2014_02_19/thread_1_seq_170.257.839962841 thread=1 sequence=170
archived log file name=+FRA/rac_stby/archivelog/2014_02_19/thread_2_seq_119.258.839962855 thread=2 sequence=119
media recovery complete, elapsed time: 00:00:02
Finished recover at 19-FEB-14
Finished Duplicate Db at 19-FEB-14
RMAN>
RMAN>
RMAN> exit
Recovery Manager complete.
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$
[oracle@rac1 admin]$ ssh racdr1
oracle@racdr1's password:
Last login: Wed Feb 19 16:56:56 2014 from rac1.localdomain
[oracle@racdr1 ~]$ . ./db_env
[oracle@racdr1 ~]$ ps -ef |grep smon
root 3027 1 1 14:43 ? 00:04:14 /u01/app/11.2.0/grid/bin/osysmond.bin
oracle 3838 1 0 14:45 ? 00:00:00 asm_smon_+ASM1
oracle 18934 1 0 18:54 ? 00:00:00 ora_smon_RAC_STBY1
oracle 19432 19399 0 19:03 pts/5 00:00:00 grep smon
[oracle@racdr1 ~]$ ps -ef |grep tns
root 10 2 0 14:42 ? 00:00:00 [netns]
oracle 14982 1 0 17:03 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oracle 15060 1 0 17:03 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
oracle 15078 1 0 17:03 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 -inherit
oracle 15091 1 0 17:03 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN3 -inherit
oracle 19439 19399 0 19:03 pts/5 00:00:00 grep tns
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ sqlplus "/ as sysdba"
set pages 10000 lines 270 long 10000
SQL*Plus: Release 11.2.0 Production on Wed Feb 19 19:03:50 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> SQL>
SQL>
SQL> define
DEFINE _DATE = "19-FEB-14" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "RAC_STBY1" (CHAR)
DEFINE _USER = "SYS" (CHAR)
DEFINE _PRIVILEGE = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
DEFINE _EDITOR = "ed" (CHAR)
DEFINE _O_VERSION = "Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE = "1102000300" (CHAR)
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED
SQL>
SQL>
SQL> alter database recover managed standby database using current logfile disconnect;
Database altered.
SQL> select * from v$diag_info;
INST_ID NAME
---------- ----------------------------------------------------------------
VALUE
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 Diag Enabled
TRUE
1 ADR Base
/u01/app/oracle
1 ADR Home
/u01/app/oracle/diag/rdbms/rac_stby/RAC_STBY1
1 Diag Trace
/u01/app/oracle/diag/rdbms/rac_stby/RAC_STBY1/trace
1 Diag Alert
/u01/app/oracle/diag/rdbms/rac_stby/RAC_STBY1/alert
1 Diag Incident
/u01/app/oracle/diag/rdbms/rac_stby/RAC_STBY1/incident
1 Diag Cdump
/u01/app/oracle/diag/rdbms/rac_stby/RAC_STBY1/cdump
1 Health Monitor
/u01/app/oracle/diag/rdbms/rac_stby/RAC_STBY1/hm
1 Default Trace File
/u01/app/oracle/diag/rdbms/rac_stby/RAC_STBY1/trace/RAC_STBY1_ora_19450.trc
1 Active Problem Count
0
1 Active Incident Count
0
11 rows selected.
SQL> select sequence#,thread#,applied from v$archived_log;
SEQUENCE# THREAD# APPLIED
---------- ---------- ---------
169 1 NO
170 1 YES
119 2 YES
171 1 YES
120 2 IN-MEMORY
SQL>
SQL> create pfile='/home/oracle/stbypfile.ora' from spfile;
File created.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ cd /home/oracle/
[oracle@racdr1 ~]$ ls -l
total 48
-rw-r--r--. 1 oracle oinstall 228 Feb 19 18:29 db_env
drwxr-xr-x. 2 oracle oinstall 4096 Aug 14 2013 Desktop
drwxr-xr-x. 2 oracle oinstall 4096 Aug 14 2013 Documents
drwxr-xr-x. 2 oracle oinstall 4096 Aug 14 2013 Downloads
-rw-r--r--. 1 oracle oinstall 226 Aug 14 2013 grid_env
drwxr-xr-x. 2 oracle oinstall 4096 Aug 14 2013 Music
drwxr-xr-x. 3 oracle oinstall 4096 Aug 14 2013 oradiag_oracle
drwxr-xr-x. 2 oracle oinstall 4096 Aug 14 2013 Pictures
drwxr-xr-x. 2 oracle oinstall 4096 Aug 14 2013 Public
-rw-r--r--. 1 oracle oinstall 2113 Feb 19 19:06 stbypfile.ora
drwxr-xr-x. 2 oracle oinstall 4096 Aug 14 2013 Templates
drwxr-xr-x. 2 oracle oinstall 4096 Aug 14 2013 Videos
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ cp stbypfile.ora stbypfile.ora.original
Modified the stbyfile.ora to include RAC_STBY1 and make a node of the case used for RAC_STBY1 which is upper
[oracle@racdr1 ~]$ cat /home/oracle/stbypfile.ora
RAC_STBY1.__db_cache_size=503316480
RAC_STBY1.__java_pool_size=4194304
RAC_STBY1.__large_pool_size=4194304
RAC_STBY1.__pga_aggregate_target=264241152
RAC_STBY1.__sga_target=796917760
RAC_STBY1.__shared_io_pool_size=0
RAC_STBY1.__shared_pool_size=276824064
RAC_STBY1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/rac_stby/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/rac_stby/controlfile/current.257.839962459'#Set by RMAN
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain='localdomain'
*.db_file_name_convert='+DATA/rac_stby','+DATA/rac'
*.db_name='RAC'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=12884901888
*.db_unique_name='RAC_STBY'#Is standby
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=RACXDB)'
*.fal_server='RAC'#Is primary
RAC_STBY1.instance_number=1
*.log_archive_config='DG_CONFIG=(RAC,RAC_STBY)'
*.log_archive_dest_2='SERVICE=RAC NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.log_file_name_convert='+FRA/rac_stby','+FRA/rac','+DATA/rac_stby','+DATA/rac'
*.open_cursors=300
*.pga_aggregate_target=264241152
*.processes=150
*.remote_listener='scan:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=793772032
*.standby_file_management='AUTO'
RAC_STBY1.thread=1
RAC_STBY1.undo_tablespace='UNDOTBS1'
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ sqlplus "/ as sysdba"
set pages 10000 lines 270 long 10000
SQL*Plus: Release 11.2.0 Production on Wed Feb 19 19:11:29 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> SQL>
SQL>
SQL> define
DEFINE _DATE = "19-FEB-14" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "RAC_STBY1" (CHAR)
DEFINE _USER = "SYS" (CHAR)
DEFINE _PRIVILEGE = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
DEFINE _EDITOR = "ed" (CHAR)
DEFINE _O_VERSION = "Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE = "1102000300" (CHAR)
SQL>
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> !pwd
/home/oracle
SQL> startup mount pfile='/home/oracle/stbypfile.ora';
ORACLE instance started.
Total System Global Area 793350144 bytes
Fixed Size 2232552 bytes
Variable Size 285216536 bytes
Database Buffers 503316480 bytes
Redo Buffers 2584576 bytes
Database mounted.
SQL>
SQL> create spfile='+DATA/rac_stby/parameterfile/spfilerac_stby.ora' from pfile='/home/oracle/stbypfile.ora';
File created.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@racdr1 ~]$ cd $ORACLE_HOME/dbs
content of initRAC_STBY1.ora should be as below:
[oracle@racdr1 dbs]$ cat initRAC_STBY1.ora
SPFILE='+DATA/RAC_STBY/parameterfile/spfileRAC_STBY.ora' # line added by Agent
[oracle@racdr1 dbs]$
Remove the spfile for standby as this is now in ASM and init file is pointing that
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$ rm spfileRAC_STBY1.ora
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$ env | grep smon
[oracle@racdr1 dbs]$ env | grep -i oracle
BASE_PATH=/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
ORACLE_UNQNAME=CDBRAC
DB_HOME=/u01/app/oracle/product/11.2.0/db_1
USER=oracle
LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/db_1/lib:/lib:/usr/lib
ORACLE_SID=RAC_STBY1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOSTNAME=racdr1.localdomain
MAIL=/var/spool/mail/oracle
PATH=/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
PWD=/u01/app/oracle/product/11.2.0/db_1/dbs
ORACLE_TERM=xterm
HOME=/home/oracle
LOGNAME=oracle
CLASSPATH=/u01/app/oracle/product/11.2.0/db_1/JRE:/u01/app/oracle/product/11.2.0/db_1/jlib:/u01/app/oracle/product/11.2.0/db_1/rdbms/jlib
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
OLDPWD=/u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$ pwd
/u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@racdr1 dbs]$ cat initRAC_STBY1.ora
*.db_name=RAC
[oracle@racdr1 dbs]$ cat initrac_stby1.ora
spfile='+DATA/rac_stby/parameterfile/spfilerac_stby.ora'
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$ srvctl add database -d RAC_STBY -n rac -o /u01/app/oracle/product/11.2.0/db_1 -m localdomain -p '+DATA/RAC_STBY/parameterfile/spfileRAC_STBY.ora' -r physical_standby -a DATA,FRA -s open
[oracle@racdr1 dbs]$ srvctl add instance -d RAC_STBY -i RAC_STBY1 -n racdr1
[oracle@racdr1 dbs]$ srvctl start database -d RAC_STBY
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$ srvctl status database -d RAC_STBY
Instance RAC_STBY1 is running on node racdr1
[oracle@racdr1 dbs]$
[oracle@racdr1 dbs]$ sqlplus "/ as sysdba"
set pages 10000 lines 270 long 10000
SQL*Plus: Release 11.2.0 Production on Thu Feb 20 09:03:32 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> SQL>
SQL> select sequence#,thread#,applied from v$archived_log;
SEQUENCE# THREAD# APPLIED
---------- ---------- ---------
169 1 YES
170 1 YES
119 2 YES
171 1 YES
120 2 YES
121 2 NO
172 1 NO
122 2 NO
173 1 NO
123 2 NO
174 1 NO
124 2 NO
175 1 NO
13 rows selected.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@racdr1 ~]$ . ./db_env
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ srvctl config database -d rac_stby
Database unique name: RAC_STBY
Database name: rac
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/RAC_STBY/parameterfile/spfileRAC_STBY.ora
Domain: localdomain
Start options: open
Stop options: immediate
Database role: PHYSICAL_STANDBY
Management policy: AUTOMATIC
Server pools: RAC_STBY
Database instances: RAC_STBY1
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ srvctl status database -d RAC_STBY
Instance RAC_STBY1 is running on node racdr1
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ su -
Password:
[root@racdr1 ~]# . ./grid_env
[root@racdr1 ~]# crsctl status resource ora.rac_stby.db -p
NAME=ora.rac_stby.db
TYPE=ora.database.type
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
ACTIVE_PLACEMENT=1
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
AUTO_START=restore
CARDINALITY=1
CHECK_INTERVAL=1
CHECK_TIMEOUT=30
CLUSTER_DATABASE=true
DATABASE_TYPE=RAC
DB_UNIQUE_NAME=RAC_STBY
DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=database) PROPERTY(DB_UNIQUE_NAME= CONCAT(PARSE(%NAME%, ., 2), %USR_ORA_DOMAIN%, .)) ELEMENT(INSTANCE_NAME= %GEN_USR_ORA_INST_NAME%) ELEMENT(DATABASE_TYPE= %DATABASE_TYPE%)
DEGREE=1
DESCRIPTION=Oracle Database resource
ENABLED=1
FAILOVER_DELAY=0
FAILURE_INTERVAL=60
FAILURE_THRESHOLD=1
GEN_AUDIT_FILE_DEST=/u01/app/oracle/admin/rac_stby/adump
GEN_START_OPTIONS=
GEN_START_OPTIONS@SERVERNAME(racdr1)=open read only
GEN_USR_ORA_INST_NAME=
GEN_USR_ORA_INST_NAME@SERVERNAME(racdr1)=RAC_STBY1
HOSTING_MEMBERS=
INSTANCE_FAILOVER=0
LOAD=1
LOGGING_LEVEL=1
MANAGEMENT_POLICY=AUTOMATIC
NLS_LANG=
NOT_RESTARTING_TEMPLATE=
OFFLINE_CHECK_INTERVAL=0
ONLINE_RELOCATION_TIMEOUT=0
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_HOME_OLD=
PLACEMENT=restricted
PROFILE_CHANGE_TEMPLATE=
RESTART_ATTEMPTS=2
ROLE=PHYSICAL_STANDBY
SCRIPT_TIMEOUT=60
SERVER_POOLS=ora.RAC_STBY
SPFILE=+DATA/RAC_STBY/parameterfile/spfileRAC_STBY.ora
START_DEPENDENCIES=hard(ora.DATA.dg,ora.FRA.dg) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,global:ora.gns) pullup(ora.DATA.dg,ora.FRA.dg)
START_TIMEOUT=600
STATE_CHANGE_TEMPLATE=
STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DATA.dg,shutdown:ora.FRA.dg)
STOP_TIMEOUT=600
TYPE_VERSION=3.2
UPTIME_THRESHOLD=1h
USR_ORA_DB_NAME=rac
USR_ORA_DOMAIN=localdomain
USR_ORA_ENV=
USR_ORA_FLAGS=
USR_ORA_INST_NAME=
USR_ORA_INST_NAME@SERVERNAME(racdr1)=RAC_STBY1
USR_ORA_OPEN_MODE=open
USR_ORA_OPI=false
USR_ORA_STOP_MODE=immediate
VERSION=11.2.0
[root@racdr1 ~]#
[root@racdr1 ~]#
[root@racdr1 ~]#
[root@racdr1 ~]# logout
[oracle@racdr1 ~]$
[oracle@racdr1 ~]$ sqlplus "/ as sysdba"
set pages 10000 lines 270 long 10000
SQL*Plus: Release 11.2.0 Production on Thu Feb 20 09:07:58 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> SQL>
SQL> show parameter local_lis
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=192.
168.56.113)(PORT=1521))))
SQL>
SQL> select OPEN_MODE from v$database;
OPEN_MODE
--------------------
READ ONLY
SQL> alter database recover managed standby database using current logfile disconnect;
Database altered.
SQL> select sequence#,thread#,applied from v$archived_log;
SEQUENCE# THREAD# APPLIED
---------- ---------- ---------
169 1 YES
170 1 YES
119 2 YES
171 1 YES
120 2 YES
121 2 YES
172 1 YES
122 2 NO
173 1 IN-MEMORY
123 2 NO
174 1 NO
124 2 NO
175 1 NO
13 rows selected.
SQL> select OPEN_MODE from v$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
SQL>
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=RAC NOAFFIRM ASYNC VAL
ID_FOR=(ONLINE_LOGFILES,PRIMAR
Y_ROLE) DB_UNIQUE_NAME=RAC
SQL>