PLAN OF ACTION for Restoration from FCM Server to UAT Server.
We are restoring PROD production database from direct FCM Tape backup, as a first step we are restoring latest control file manually from UAT Server, after that we are running the restoration script on UAT Server. When we fired the restoration script, we got the following errors....
Later, we have tried restoring manually from the catalog in UAT Server.
We tried below steps as well when suggested by IBM team:
RMAN>catalog DEVICE TYPE 'SBT_TAPE' BACKUPPIECE '"pesguqus_1_1"';
After running this command, we are getting following error:
ORA_19511: Error received from media manager Layer, error text:
ANS1302E (RC2) No objects on server match query.
Basically Our FCM Backup will be happening as follows:
In Production Database, we will take control file backup manually with RMAN, post which we connect Production Database with active IP address i.e. xx.xx.xx.xx.
Once we connect xx.xx.xx.xx, we execute the following two commands to take Backup of Production database through FCM.
Follow the below commands:
bash-4.4$ cd $ORACLE_HOME/acs
bash-4.4$ fcmcli -f unmount
IBM Tivoli Storage FlashCopy(R) Manager offload agent
- Version 4, Release 1, Level 3.0 for AIX LF 64-bit -
Build: 763 generated on Jul 31 2015
(c) Copyright IBM Corporation, 2000, 2015, All Rights Reserved.
FMM0005I Start of program at: Thu Jul 13 16:47:56 IST 2017.
FMM8800I The command is: unmount
FMM6501I Initializing 'unmount' request.
FMM6502I Executing 'unmount' request.
FMM6503I Terminating 'unmount' request.
FMM6518I No snapshot backup is currently mounted. ----------------->>(this line should be present)
FMM0020I End of program at: Thu Jul 13 16:47:58 IST 2017.
FMM0021I Elapsed time: 02 sec.
FMM0024I Return code is: 0.
bash-4.4$ pwd
/oracle/app/oradata/product/11.2.0/dbhome_1/acs
bash-4.4$ acsora -f backup ------------------------>>>(this is the command to start the backup)
Backup initiating process:
- Initially it will take snapshot of the production database.
- Then it will connect to FCM Server (XX.XX.XX.XX), in that we have catalog database (catdb).
- Once it is connected to catalog database, in cat database we have one script (rman.sh) to take backup, the script consist TSM Tape path ‘ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
- Then backup will happen in TAPE.
NOTE:
ISSUE
All the backup that happens through FCM Server (XX.XX.XX.XX), backup information will always be stored in catalog database’s control file only. Hence, while trying restoration direct from UAT server (xx.xx.xx.xx), it’s not happening because of missing backup information.
SOLUTION:
Therefore, we have planned the restoration to happen from XX.XX.XX.XX (PROD FCM server) with the help of CATALOG database and restore it to xx.xx.xx.xx (UAT Server) .
Following Steps:
STEP 1:
- In UAT Server (10.0.2.133), first we will configure LISTNER file:
$ cd $ORACLE_HOME/network/admin
$ vi listener.ora
UATPROD1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1531))
)
SID_LIST_UATPROD1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PROD1)
(ORACLE_HOME = /oracle/app/oradata/product/11.2.0/dbhome_1)
(ENVS = 'EPC_DISABLED=TRUE')
)
- Then start the listener: UATPROD1.
$ lsnrctl start UATPROD1
STEP 2:
- Configure TNSNAMES entry in FCM Server (XX.XX.XX.XX).
$ cd $ORACLE_HOME/network/admin
$vi tnsnames.ora
UATPROD1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1531))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD1)
)
)
STEP 3:
In UAT Server (xx.xx.xx.xx),
- First we have to export Oracle instance:
$ export ORACLE_SID=PROD1
Then connect RMAN
$ rman target /
- set DBID
RMAN> set DBID=1971255728;
RMAN> startup nomount pfile='/oracle/app/oradata/product/11.2.0/dbhome_1/initPROD1.ora';
RMAN> restore controlfile from
'/home/oracle/15OCT2017/bkctrl_dPROD1_ut2sh3osk_s36770_p1_t957473684';
Once we restore control file manually, then connect FCM Server (XX.XX.XX.XX)
STEP 4:
$ export ORACLE_SID=catdb
- Then, we will connect catalog database and UAT database through RMAN.
$ rman catalog RCAT/rcat target sys/oracle123@UATPROD1
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Oct 17 14:19:44 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to target database: PROD1 (not mounted)
Connected to recovery catalog database
RMAN> alter database mount;
RMAN> crosscheck backup;
RMAN> delete noprompt expired backup;
RMAN>@RRB1_Final_Script.sql
run
{
allocate channel 'c1' type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
set newname for datafile 1 to '/PROD1_dbrestfiles/PROD1/datafile/system_01.dbf';
set newname for datafile 2 to '/PROD1_dbrestfiles/PROD1/datafile/sysaux_01.dbf';
set newname for datafile 3 to '/PROD1_dbrestfiles/PROD1/datafile/users01.dbf';
set newname for datafile 4 to '/PROD1_dbrestfiles/PROD1/datafile/tab_01.dbf';
set newname for datafile 5 to '/PROD1_dbrestfiles/PROD1/datafile/hr_tblsp_01.dbf';
set newname for tempfile 1 to '/PROD1_dbrestfiles/PROD1/tempfile/temp_sort_tblspc_01.dbf';
restore database;
switch datafile all;
switch tempfile all;
recover database;
release channel c1;
}
STEP 5:
Login in to UAT Server:
$ Sqlplus / as sysdba
SQL> select NAME,LOG_MODE,OPEN_MODE,CONTROLFILE_TYPE from v$database;
SQL> recover database until cancel using backup controlfile;
AUTO
SQL> alter database open resetlogs;
SQL> select NAME,LOG_MODE,OPEN_MODE,CONTROLFILE_TYPE from v$database;
Thanks and Comments Please..............!