Networker 8.2 heterogeneous restore Oracle 11g RAC cluster environment
This article is a belated blog, write this blog recently when finishing technology from notes, written two years ago to see the EMC Networker 8.1 heterogeneous Oracle 11gR2 database recovery operation notes (the test is that if the production database server crashes down, and to restore the backup data to the backup database server). Although last year had launched EMC Networker 9, but how much paper there is little reference value may be, he made a little after finishing it.
First, the test environment
Computer name |
IP addresses |
operating system |
Character |
install software |
Bkserver |
172.16.3.18 |
RedHat 6 |
Backup Server |
EMC Networker 8.2.2 |
dm01db01 |
172.16.0.177 |
RedHat 5 |
Production database server (the source database) |
Oracle 11g R2、 lgtoclnt-8.2.2-1.x86_64.rpm (Networker client) lgtonmda-8.2.2-1.x86_64.rpm (Networker database module) |
oracletesta |
172.16.0.69 |
RedHat 6 |
Test database server (the target database) |
Oracle 11g R2、 lgtoclnt-8.2.2-1.x86_64.rpm (Networker client) lgtonmda-8.2.2-1.x86_64.rpm (Networker database module) |
Note: The test version of Oracle database server, instance name, Oracle-related directory, create ASM path and permissions must be consistent with the production database server database.
Second, the test database server ready
1, Oracle Database installation configuration, where version, instance name, and the relevant directory permissions are required and consistent production database server, this part of the operation is not the focus of this paper, it is skipped.
2, consistent installation Networker client and database module, version required the production database server.
(1) extracting networker client installation package yum source configured to generate and cache, to solve the installation package dependencies.
(2) installed client Networker
(3) If a large amount of data is preferably used to restore SAN storage network restoration, the storage node need to install the client.
(4) started Networker client
(5) extracting installation package database module NMDA8.2.2
(6) mounted NMDA8.2.2 database module
3, link library files, switch to the oracle user to enter / $ ORACLE_HOME / lib /, and then execute the following command:
ln –s /usr/lib/libnsrora.so libobk.so
Switching root module enables the user nsrorara -i oracle
4, to ensure that the archive is turned on
[oracle@oracletesta ~]$ sqlplus / as sysdba
SQL>archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oradata/arch
Oldest online log sequence 363
Next log sequence to archive 365
Current log sequence 365
5, open the control file is automatically backed up
[oracle@oracletesta ~]$rman target /
RMAN> configure controlfile autobackup on;
RMAN> configure controlfile autobackup format for device type 'sbt_tape' to '/NMDA_%F/'
6, good hosts resolved to ensure that the backup server can resolve each other between the target database server.
7, create a SAN network storage node (step omitted here specifically)
(1) First, a network configuration SAN switch, the virtual tape library or a physical library, the host device optical and optical port HBA card draw zone
(2) and then to add a host virtual tape library connection information and assign drive
(3) Finally, create a storage node Networker, and scanning equipment
(4) arranged in the Networker Library Manager to reconfigure the library, check the distribution of drive and boot configuration
8, Networker console operator, the new Client wizard
(1) Enter the client name, and press the default choice of traditional client
(2) Click to select Oracle
(3) selecting a target storage pool is a pool Data Domain
(4) select the first item by default
(5) fill in the relevant directory path, as well as user name, instance name (fill in accordance with Oracle user environment variables)
(6) Select Browse and retention policies, as well as remote access identification * @ *
(7) choose to add to the group, the default has been checked default group, remember to remove the tick. Here is when the need to back up, we are now is to restore the database and create a client, not into the group you want to add a backup, so creating back After the client need to remove the client from the group
(8) Select SAN storage nodes created
(9) This completes the creation of the client, can recover the data.
Third, the recovery process different machines
1, by storing the query set Networker, to confirm the date of recovery, for example, to restore the backup data from June 14, No. store DataDomain
2, found on the frame memory at a selected set, a note of the name of the stored sets
3, database recovery operations must be carried out on a test database server (ie the target), use RMAN command for recovery
(1) creating the temporary parameter file pfile, and start the database to nomount mode (because it is a RAC cluster environment, we must also turn off the data to another node)
[oracle@oracletesta ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 2514:18:59 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> shutdown immediate
ORA-01109: database not open
View original path spfile
SQL>show parameter spfile;
SQL>'/u01/app/oracle/product/11.2.04/db_1/dbs/spfilePROD1.ora'
SQL>create spfile from pfile;
SQL>create pfile='/u01/app/oracle/product/11.2.04/db_1/dbs/ma.ora' from spfile;
File created.
SQL>startup nomount pfile='/u01/app/oracle/product/11.2.04/db_1/dbs/ma.ora';
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2253664 bytes
Variable Size 1006636192 bytes
Database Buffers 587202560 bytes
Redo Buffers 7319552 bytes
(2) the isolated source database dm01db01 DBID, (intermediate storage NMDA_c-xxxxxxxxx9 set name DBID-digit number) and then set the target DBID DBID database and the source database as
[oracle@oracletesta ~]$ rman target /
Recovery Manager:Release 11.2.0.4.0 - Production on Wed Nov 19 14:49:36 2014
Copyright (c)1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected totarget database: MA (not mounted)
RMAN> set dbid=298958524;
executing command: SET DBID
(3) use RMAN script to restore spfile
RMAN> RUN {
2> ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';
3> send 'NSR_ENV=(NSR_SERVER=bakserver, NSR_CLIENT=dm01db01.chinacoal.com)';
4> restore spfile to '/u01/app/oracle/product/11.2.04/db_1/dbs/spfilePROD1.ora' from '/NMDA_c-298958524-20190614-00/';
5> }
After performing RMAN script output below, you can see spfile file has been successfully restored:
allocated channel: s1
channel CH1: SID=63 device type=SBT_TAPE
channel CH1: NMDA Oracle v8.2.2
sent command to channel: CH1
Starting restore
channel CH1: restoring spfile from AUTOBACKUP /NMDA_c-298958524-20190614-00/
channel CH1: SPFILE restore from AUTOBACKUPcomplete
Exit rman, just use the parameter file recovery, boot mode to nomount
[oracle@oracletesta ~]$ sqlplus / as sysdba
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup nomount
(4) Using RMAN script to restore controlfile
RMAN> RUN {
2> ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';
3> send 'NSR_ENV = (NSR_SERVER = back-end server NSR_CLIENT = dm01db01)';
4> restore controlfile from '/NMDA_c-298958524-20190614-00/';
5> }
After performing RMAN script output below, you can see a control file has been successfully restored:
allocated channel: CH1
channel CH1: SID=63 device type=SBT_TAPE
channel CH1: NMDA Oracle v8.2.2
sent command to channel: CH1
Starting restore at 27-NOV-14
channel CH1: restoring control file
channel CH1: restore complete, elapsed time:00:00:07
output filename=/database/dbdata/ma/control01.ctl
output filename=/database/system/fast_recovery_area/ma/control02.ctl
(5) mount database
RMAN>alter database mount;
sql statement: alter database mount
(6) to restore the data file through RMAN script does not need to specify a point in time, will find RMAN The recording control file
After performing RMAN script output below, you can see that the data file has been successfully restore, and began to recover
After performing RMAN script that will prompt error can not find a serial number xxxx archive, because Oracle does not automatically truncate the log, we will continue to find required under a log file, so you need to specify truncation in the RMAN script
(8) Add recover until sequence 96772 in the script, RMAN script recover the database again
This will recover a success
(9) to open the database, and resetlogs, this error is that the database is complete restoration, no resetlogs
RMAN> exit
RecoveryManager complete.
[oracle@oracletesta dbs]$ sqlplus / as sysdba
SQL> alter database openresetlogs;
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SQL> alter database open;
Database altered.
(10) to start listening
[oracle@oracletesta dbs]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-JUN-2019 18:37:17
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> start
(11) So far, the database has been completed heterogeneous recovery, the remaining work is to test data is complete, normal, change the database connection address application system for verification and so on.