This discussion is archived
9 Replies Latest reply: Nov 22, 2012 1:59 AM by IGorbatovsky RSS

Create standby after failover

IGorbatovsky Newbie
Currently Being Moderated
Hello all,

Recently I had to perform a failover on my standby DB, because my Primary Db had a hardware problem. Now I have to recreate our previously well worked environment. But I stuck just on the first step when I try to restore controlfile. It seems that restore process doesn't recognize controlfile, created for standby, in repository, although the information is there.

Here are my steps. I think they will tell you more than my long explanations.


On now primary DB:

bash-3.2$ tnsping stbill

TNS Ping Utility for HPUX: Version 10.2.0.4.0 - Production on 11-NOV-2012 13:14:01

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:
*/oracle2/10.2.0/network/admin/sqlnet.ora*


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.10)(PORT = 1521))) (CONNECT_DATA = (UR = A) (SERVER = DEDICATED) (SERVICE_NAME = bill)))
OK (0 msec)
bash-3.2$ rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Sun Nov 11 13:14:26 2012

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: BILL (DBID=1733626124)

RMAN> backup current controlfile for standby;

Starting backup at 11-NOV-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=2703 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including standby control file in backupset
channel ORA_DISK_1: starting piece 1 at 11-NOV-12
channel ORA_DISK_1: finished piece 1 at 11-NOV-12
piece handle=/backup/bill/ora_df799074913_s18254_s1 tag=TAG20121111T131513 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 11-NOV-12

RMAN> list backup of controlfile;


List of Backup Sets
*===================*

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
*17383 Full 44.75M SBT_TAPE 00:00:04 15-DEC-11*

BP Key: 44516 Status: AVAILABLE Compressed: NO Tag: TAG20111215T014102
Handle: full_backup<bill_18121:769916462:1>.ctl Media: MSL_4048_drive1
Control File Included: Ckp SCN: 224591537903 Ckp time: 15-DEC-11

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
*17384 Full 44.75M SBT_TAPE 00:00:49 15-DEC-11*

BP Key: 44517 Status: AVAILABLE Compressed: NO Tag: TAG20111215T014108
Handle: c-1733626124-20111215-00 Media: MSL_4048_drive1
Control File Included: Ckp SCN: 224591550862 Ckp time: 15-DEC-11

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
*17387 Full 44.75M SBT_TAPE 00:00:04 15-DEC-11*

BP Key: 44520 Status: AVAILABLE Compressed: NO Tag: TAG20111215T071237
Handle: arch_backup<bill_18125:769936357:1>.ctl Media: MSL_4048_drive1
Control File Included: Ckp SCN: 224624133160 Ckp time: 15-DEC-11

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
*17388 Full 44.75M SBT_TAPE 00:00:49 15-DEC-11*

BP Key: 44521 Status: AVAILABLE Compressed: NO Tag: TAG20111215T071242
Handle: c-1733626124-20111215-01 Media: MSL_4048_drive1
Control File Included: Ckp SCN: 224624137556 Ckp time: 15-DEC-11

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
*17461 Full 45.00M SBT_TAPE 00:00:49 09-NOV-12*

BP Key: 44594 Status: AVAILABLE Compressed: NO Tag: TAG20121109T184521
Handle: c-1733626124-20121109-1a Media: c8a4e60a:4db50d68:1b98:0002
Control File Included: Ckp SCN: 293195890346 Ckp time: 09-NOV-12

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
*17499 Full 44.86M DISK 00:00:02 11-NOV-12*

BP Key: 44633 Status: AVAILABLE Compressed: NO Tag: TAG20121111T131513
Piece Name: /backup/bill/ora_df799074913_s18254_s1
Standby Control File Included: Ckp SCN: 293442044150 Ckp time: 11-NOV-12

RMAN> exit
Recovery Manager complete.
bash-3.2$ scp /backup/bill/ora_df799074913_s18254_s1 oracle@192.168.1.10:/backup/bill
Password:

ora_df799074913_s18254_s1 100% 45MB 22.4MB/s 00:02

bash-3.2$ rman

Recovery Manager: Release 10.2.0.4.0 - Production on Sun Nov 11 13:20:33 2012

Copyright (c) 1982, 2007, Oracle. All rights reserved.

RMAN> connect target /

connected to target database: BILL (DBID=1234567892)

RMAN> connect auxiliary sys/pass@stbill

connected to auxiliary database: BILL (not mounted)

*RMAN> run {allocate auxiliary channel 'ch1' type DISK;*
*2> allocate auxiliary channel 'dev_1' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bill)';*
*3> allocate auxiliary channel 'dev_2' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bill)';*
*4> allocate auxiliary channel 'dev_3' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bill)';*
*5> set until scn =292650739066;*
*6> duplicate target database for standby;*
*7> release channel ch1;release channel dev_1;release channel dev_2;release channel dev_3;}*

using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: sid=3285 devtype=DISK

allocated channel: dev_1
channel dev_1: sid=3287 devtype=SBT_TAPE
channel dev_1: Data Protector A.06.11/PHSS_42698/PHSS_42699/DPSOL_00481/DPLNX_

allocated channel: dev_2
channel dev_2: sid=3286 devtype=SBT_TAPE
channel dev_2: Data Protector A.06.11/PHSS_42698/PHSS_42699/DPSOL_00481/DPLNX_

allocated channel: dev_3
channel dev_3: sid=3289 devtype=SBT_TAPE
channel dev_3: Data Protector A.06.11/PHSS_42698/PHSS_42699/DPSOL_00481/DPLNX_

executing command: SET until clause

Starting Duplicate Db at 11-NOV-12

contents of Memory Script:
*{*
set until scn 292650739066;
restore clone standby controlfile;
sql clone 'alter database mount standby database';
*}*
executing Memory Script

executing command: SET until clause

Starting restore at 11-NOV-12

released channel: ch1
released channel: dev_1
released channel: dev_2
released channel: dev_3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/11/2012 13:22:09
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore

RMAN>



Thank you in advance for you valuable replies

Regards,

I. Gorbatovsky

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points