Step-1: From all the nodes create a new folder to hold archive files.
$ mkdir archive1 (on HOST01)
$ mkdir archive2 (on HOST02)
Step-2: From Node1, set archiving destination for both the nodes.
SQL_ORCL1> alter system set log_archive_dest_1='location=/home/oracle/archive1' scope=both sid='orcl1'
SQL_ORCL1> alter system set log_archive_dest_1='location=/home/oracle/archive2' scope=both sid='orcl2'
Step-3: Verify whether your database is in archived log mode or not
SQL_ORCL1> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/archive1
Oldest online log sequence 39
Next log sequence to archive 40
Current log sequence 40
Step-4: Perform logswitch 2-3 times from all the nodes to crate archived files.
SQL_ORCL1> alter system switch logfile;
Step-5: From node1, perform backup of any tablespace to simulate demo
RMAN> backup datafile 4;
Step-6: Perform logswitch 2-3 times from all the nodes to crate archived files.
SQL_ORCL1> alter system switch logfile;
Step-7: Make any tablespace offline and then checkpoint to simulate demo.
SQL_ORCL1> alter tablespace users offline immediate;
SQL_ORCL1> alter system checkpoint;
Step-8: Now try to make that tablespace online and see the error.
SQL_ORCL1> alter tablespace users online;
alter tablespace users online
*
ERROR at line 1:
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.793144149'
Step-9: Now from rman, do restore and recovery of that tablespace, while recovery you will recieve an error because remote archives are not visible for node1.
Step-9: Now to solve this problem configure NFS. Using NFS map node2 archive folder with node1.
1. From Node1, create the same folder to map with node2.
$ mkdir archive2
2. From node1, open /etc/exports file and put few entries.
# vim /etc/exports
/home/oracle/archive
# service portmap restart
# service nfs restart
3. From node2, open /etc/exports file and put few entries.
# vim /etc/exports
/home/oracle/archive2 *(rw,sync)
# service portmap restart
# service nfs restart
4. From Node1, mount archive folder of node2 on node1.
# mount host02:/home/oracle/archive2 /home/oracle/archive2
Step-10: Now go and do the recovery.
$ mkdir archive1 (on HOST01)
$ mkdir archive2 (on HOST02)
Step-2: From Node1, set archiving destination for both the nodes.
SQL_ORCL1> alter system set log_archive_dest_1='location=/home/oracle/archive1' scope=both sid='orcl1'
SQL_ORCL1> alter system set log_archive_dest_1='location=/home/oracle/archive2' scope=both sid='orcl2'
Step-3: Verify whether your database is in archived log mode or not
SQL_ORCL1> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/archive1
Oldest online log sequence 39
Next log sequence to archive 40
Current log sequence 40
Step-4: Perform logswitch 2-3 times from all the nodes to crate archived files.
SQL_ORCL1> alter system switch logfile;
Step-5: From node1, perform backup of any tablespace to simulate demo
RMAN> backup datafile 4;
Step-6: Perform logswitch 2-3 times from all the nodes to crate archived files.
SQL_ORCL1> alter system switch logfile;
Step-7: Make any tablespace offline and then checkpoint to simulate demo.
SQL_ORCL1> alter tablespace users offline immediate;
SQL_ORCL1> alter system checkpoint;
Step-8: Now try to make that tablespace online and see the error.
SQL_ORCL1> alter tablespace users online;
alter tablespace users online
*
ERROR at line 1:
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.793144149'
Step-9: Now from rman, do restore and recovery of that tablespace, while recovery you will recieve an error because remote archives are not visible for node1.
Step-9: Now to solve this problem configure NFS. Using NFS map node2 archive folder with node1.
1. From Node1, create the same folder to map with node2.
$ mkdir archive2
2. From node1, open /etc/exports file and put few entries.
# vim /etc/exports
/home/oracle/archive
# service portmap restart
# service nfs restart
3. From node2, open /etc/exports file and put few entries.
# vim /etc/exports
/home/oracle/archive2 *(rw,sync)
# service portmap restart
# service nfs restart
4. From Node1, mount archive folder of node2 on node1.
# mount host02:/home/oracle/archive2 /home/oracle/archive2
Step-10: Now go and do the recovery.
No comments:
Post a Comment