Recovery Catalog Kullanarak Eski Bir Backupı Farklı Bir Hosta Nasıl Restore Edebiliriz

Anlatacağımız örneğin detayından biraz bahsetmek istiyorum. Bizim örneğimizdeki durum aslında şöyle, production databaselerimizden birinin 2010 yılına ait eski bir backupı, o günkü datalarını görebilmek için farklı bir sunucu üzerine dönmemiz gerekti. Bu çalışma aslında içerisinde birçok testide barındırıyor, rman recovery catalog üzerinden restore işlemi nasıl yapılır, tape içerisindeki eski bir backup farklı bir host üzerine recovery catalog kullanılarak nasıl dönülür gibi bir takım sorulara da cevap olacağını düşünüyorum. Restore öncesinde yapmamız gereken kontrollerden de bahsederek işlemlerimize başlayalım ;

Öncelikle production sunucusu üzerinden rman cataloga bağlanıp döneceğimiz backup’ ın statüsünü bir bakalım;

Buradaki amaç kullanılacak olan backupın expire olup olmadığını kontrol etmektir. Rman tarafında expire olmuş olan bir backupı kullanamazsınız.

>\ rman target / rcvcat prod/xxxxxxxx@RMNCATALOG

Recovery Manager: Release 10.2.0.4.0 – Production on Sat Feb 25 00:51:01 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: PROD (DBID=1234567899)
connected to recovery catalog database

RMAN> list backupset;
starting full resync of recovery catalog

full resync complete

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


BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
56848 Full Unknown SBT_TAPE 09:11:57 30-DEC-10
BP Key: 1537591 Status: EXPIRED Compressed: NO Tag: TAG20101230T014722
Handle: 58m0qm1d_1_1 Media:
List of Datafiles in backup set 56848
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
1 Full 48612681769 29-DEC-10 /u10/oradata/prod/system01.dbf
2 Full 48612681769 29-DEC-10 /u10/oradata/prod/proddb01.dbf
..
..

45 Full 48612681769 29-DEC-10 /u11/oradata/prod/INFRA34.dbf
46 Full 48612681769 29-DEC-10 /u11/oradata/prod/INFRA35.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
56849 Full Unknown SBT_TAPE 00:00:48 30-DEC-10
BP Key: 1537592 Status: EXPIRED Compressed: NO Tag: TAG20101230T014722
Handle: 59m0rmcd_1_1 Media:
Control File Included: Ckp SCN: 48612681769 Ckp time: 29-DEC-10
SPFILE Included: Modification time: 30-DEC-10
..
..

Kullanmak istediğim backup’ ın expired olmuş olduğunu görüyoruz. Dolayısıyla İşlemimize devam edebilmek için öncelikle bunu AVAILABLE haline getirmemiz gerekiyor. Bu işlemi nasıl yapabileceğimizden http://www.kamilturkyilmaz.com/2012/02/26/recover-catalog-ile-tape%e2%80%99-e-alinmis-olan-backuplarin-expire-olmasi-durumunda/
linkdeki yazımda bahsetmiştim dolayısıyla bu adımları geçiyorum. Kullanacağım backupları tekrar cataloglayıp rman’ e tanıttıp AVAILABLE olduğunu gördükden sonra devam ediyorum.

Backup’ ım artık AVAILABLE olduğuna göre, test ortamına recovery catalog üzerinde bulunan prod backupını dönme işlemine adım adım başlayalım ;

• Yeni HOST üzerinde database’ inde ORACLE_SID’ yi set etmekle başlıyoruz ;

export ORACLE_SID=prod

• Yeni ortamda restore yaparken kullanacağımız dbid değerini Production ortamdan alıp not ediyoruz;

SQL> Select dbid from v$database ;

DBID
———-
1234567899

Tüm dba arkadaşlara şiddetle önerim tüm database’ lerinizin DBID’ lerini mutlaka bir yere not edin. Çünkü database’ inizde bir crash durumu yaşandığında ve backupınızı farklı bir ortama dönmek zorunda kalırsanız bu bilgiye ihtiyacınız olacaktır. Bu tarz durumlar da hız çok önemli olduğundan dolayı bu bilgi size ciddi zaman kazandıracaktır.

• Prod ortamdaki pfile’ i test ortamına taşıyarak, test ortamında farklı olabilecek değerleri editliyoruz;

Örneğin, pfile içerisindeki memory değerlerini, control_file, audit_file, *_dump_dest parametrelerini (eğer buradaki dizin yapılarımız farklı ise) değiştiriyoruz.

• Test ortamının bulunduğu sunucu üzerinden Tape device’ ona erişiminin olması gerekiyor.

• Bizim örneğimizde pfile’ imizi operating system komutları ile taşıyarak pfile’ i restore ettik aslında ama bu şekilde değilde kartuş içerisinden dönmek isteseydik ;

Oracle sid değerinin set edildiğinden emin olmakla başlıyoruz,;

trgenora01t:oracle:/u01/sq/ora_1/oracle>\ echo $ORACLE_SID
prod
trgenora01t:oracle:/u01/sq/ora_1/oracle>\

Spfile ve controlfile ‘ i restore etmek için catalog database’ ine bağlanacaz ama datafile’ leri restore ederken catalog database’ ini kullanmayacağız.

Bu işlemleri yapabilmek için Tape içerisindeki backupsetin spfile ve controlfile backuplarını içerdiğini kabul ediyoruz. Dolayısıyla rman’ de show all komutu ile autobackup format parametresinin ON olduğunu biliyoruz. Sizlerde mutlaka bu değeri kontrol ediniz. Almış olduğunuz tüm backupların spfile ve controlfile’ ide otomatik olarak her backup set içerisine dahil edilmesini sağlamanız ciddi yarar sağlayacaktır.

Spfile restore işlemine devam ediyoruz ;

trgenora01t:oracle:/u01/sq/ora_1/oracle>\ rman target / rcvcat prod/xxxxxxxx@RMNCATALOG

Recovery Manager: Release 10.2.0.4.0 – Production on Sat Feb 25 13:53:36 2012

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

connected to target database: prod (not mounted)
connected to recovery catalog database

RMAN> STARTUP FORCE NOMOUNT
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ‘/u01/sq/ora_1/oracle/db/10.2.0/dbs/initprod.ora’

starting Oracle instance without parameter file for retrival of spfile
Oracle instance started

Total System Global Area 159383552 bytes

Fixed Size 2082504 bytes
Variable Size 67111224 bytes
Database Buffers 83886080 bytes
Redo Buffers 6303744 bytes

RMAN> set dbid=1234567899;

executing command: SET DBID
database name is “PROD” and DBID is 1234567899

RMAN> RUN
2> {
3> ALLOCATE CHANNEL ch00 DEVICE TYPE sbt_tape PARMS=’ENV=(SBT_LIBRARY=/u01/sq/ora_1/oracle/db/10.2.0/lib/libobk.a, NB_ORA_POLICY=PROD1_PROD_ONLINE, NB_ORA_CLIENT=prod1, NB_ORA_SERV=veritas)’;
4> RESTORE SPFILE TO PFILE ‘/u01/sq/ora_1/oracle/db/10.2.0/dbs/initprod.ora’ FROM TAG=’TAG20101230T014722′;
5> }

allocated channel: ch00
channel ch00: sid=159 devtype=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle – Release 7.0 (2010070805)

Starting restore at 25-FEB-12

channel ch00: starting datafile backupset restore
channel ch00: restoring SPFILE to PFILE
output filename=/u01/sq/ora_1/oracle/db/10.2.0/dbs/initprod.ora
channel ch00: reading from backup piece 59m0rmcd_1_1
channel ch00: restored backup piece 1
piece handle=59m0rmcd_1_1 tag=TAG20101230T014722
channel ch00: restore complete, elapsed time: 00:02:45
Finished restore at 25-FEB-12
released channel: ch00

Spfile’ imiz artık hazır. Ben spfile’ i kopyalarak sonrasında editlemiştim bu şekilde dönecek olursanız pfile içerisindeki ilgili kısımları mutlaka editliyor olmanız gerekiyor. (özellikle path bilgilerine dikkat ediniz)

Sonarasında controlfile’ i restore ile devam ediyoruz;

RUN
{
ALLOCATE CHANNEL ch00 DEVICE TYPE sbt_tape PARMS=’ENV=(SBT_LIBRARY=/u01/sq/ora_1/oracle/db/10.2.0/lib/libobk.a, NB_ORA_CLIENT=prod1, NB_ORA_SERV=veritas)’;
RESTORE CONTROLFILE FROM “59m0rmcd_1_1”;
}

channel ch00: restoring control file
channel ch00: restore complete, elapsed time: 00:04:20
output filename=/u06/oradata/prod/ct/control01.ctl
output filename=/u12/oradata/prod/ct/control02.ctl
Finished restore at 26-FEB-12
released channel: ch00

Controlfile’ imizi de restore ettiğimize göre artık database’ imizi mount moda alıp restore işlemine başlayabiliriz.

RMAN> alter database mount ;
database mounted

Restore database kısmıını catalog üzerinden yapmayacağımız için exit ile çıkıp cataloga connect olmadan rman’ e bağlanıyoruz ;

trgenora01t:oracle:/u01/sq/ora_1/oracle>\ rman TARGET / NOCATALOG

Recovery Manager: Release 10.2.0.4.0 – Production on Sat Feb 25 12:14:49 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)
using target database control file instead of recovery catalog

RMAN> run
2> {
3> ALLOCATE CHANNEL ch00 DEVICE TYPE sbt_tape PARMS=’ENV=(SBT_LIBRARY=/u01/sq/ora_1/oracle/db/10.2.0/lib/libobk.a, NB_ORA_CLIENT=prod1, NB_ORA_SERV=veritas)’;
4> SET NEWNAME FOR DATAFILE 1 to ‘/u12/oradata/prod/system01.dbf’;
5> SET NEWNAME FOR DATAFILE 1 to ‘/u12/oradata/prod/proddb01.dbf’;
6> SET NEWNAME FOR DATAFILE 3 TO ‘/u12/oradata/prod/sysaux01.dbf’;
7> SET NEWNAME FOR DATAFILE 4 TO ‘/u12/oradata/prod/users01.dbf’;
8> SET NEWNAME FOR DATAFILE 5 TO ‘/u12/oradata/prod/INFRA01.dbf’;
9> SET NEWNAME FOR DATAFILE 6 TO ‘/u12/oradata/prod/INFRA02.dbf’;
10> SET NEWNAME FOR DATAFILE 7 TO ‘/u12/oradata/prod/INFRA03.dbf’;
11> SET NEWNAME FOR DATAFILE 8 TO ‘/u12/oradata/prod/INFRA04.dbf’;
12> SET NEWNAME FOR DATAFILE 9 TO ‘/u12/oradata/prod/INFRA08.dbf’;
13> SET NEWNAME FOR DATAFILE 10 TO ‘/u12/oradata/prod/INFRA07.dbf’;
14> SET NEWNAME FOR DATAFILE 11 TO ‘/u12/oradata/prod/INFRA06.dbf’;
15> SET NEWNAME FOR DATAFILE 12 TO ‘/u12/oradata/prod/INFRA05.dbf’;
16> SET NEWNAME FOR DATAFILE 13 TO ‘/u12/oradata/prod/INFRA09.dbf’;
17> SET NEWNAME FOR DATAFILE 14 TO ‘/u12/oradata/prod/INFRA10.dbf’;
18> SET NEWNAME FOR DATAFILE 15 TO ‘/u12/oradata/prod/INFRA11.dbf’;
19> SET NEWNAME FOR DATAFILE 16 TO ‘/u12/oradata/prod/INFRA12.dbf’;
20> SET NEWNAME FOR DATAFILE 17 TO ‘/u12/oradata/prod/INFRA13.dbf’;
21> SET NEWNAME FOR DATAFILE 18 TO ‘/u12/oradata/prod/INFRA14.dbf’;
22> SET NEWNAME FOR DATAFILE 19 TO ‘/u12/oradata/prod/INFRA15.dbf’;
23> SET NEWNAME FOR DATAFILE 20 TO ‘/u12/oradata/prod/INFRA16.dbf’;
24> SET NEWNAME FOR DATAFILE 21 TO ‘/u12/oradata/prod/INFRA17.dbf’;
25> SET NEWNAME FOR DATAFILE 22 TO ‘/u12/oradata/prod/INFRA18.dbf’;
26> SET NEWNAME FOR DATAFILE 23 TO ‘/u12/oradata/prod/INFRA19.dbf’;
27> SET NEWNAME FOR DATAFILE 24 TO ‘/u12/oradata/prod/INFRA20.dbf’;
28> SET NEWNAME FOR DATAFILE 25 TO ‘/u12/oradata/prod/INFRA21.dbf’;
29> SET NEWNAME FOR DATAFILE 26 TO ‘/u12/oradata/prod/INFRA22.dbf’;
30> SET NEWNAME FOR DATAFILE 27 TO ‘/u12/oradata/prod/INFRA23.dbf’;
31> SET NEWNAME FOR DATAFILE 28 TO ‘/u12/oradata/prod/INFRA24.dbf’;
32> SET NEWNAME FOR DATAFILE 29 TO ‘/u12/oradata/prod/INFRA25.dbf’;
33> SET NEWNAME FOR DATAFILE 30 TO ‘/u12/oradata/prod/INFRA26.dbf’;
34> SET NEWNAME FOR DATAFILE 31 TO ‘/u12/oradata/prod/INFRA27.dbf’;
35> SET NEWNAME FOR DATAFILE 32 TO ‘/u12/oradata/prod/proddb02.dbf’;
36> SET NEWNAME FOR DATAFILE 33 TO ‘/u12/oradata/prod/INFRA28.dbf’;
37> SET NEWNAME FOR DATAFILE 34 TO ‘/u12/oradata/prod/INFRA29.dbf’;
38> SET NEWNAME FOR DATAFILE 35 TO ‘/u12/oradata/prod/INFRA31.dbf’;
39> SET NEWNAME FOR DATAFILE 36 TO ‘/u12/oradata/prod/INFRA32.dbf’;
40> SET NEWNAME FOR DATAFILE 37 TO ‘/u12/oradata/prod/proddb03.dbf’;
41> SET NEWNAME FOR DATAFILE 38 TO ‘/u12/oradata/prod/INFRA30.dbf’;
42> SET NEWNAME FOR DATAFILE 39 TO ‘/u12/oradata/prod_dup/INFRA07.dbf’;
43> SET NEWNAME FOR DATAFILE 40 TO ‘/u12/oradata/prod_dup/INFRA31.dbf’;
44> SET NEWNAME FOR DATAFILE 41 TO ‘/u12/oradata/prod/INFRA33.dbf’;
45> SET NEWNAME FOR DATAFILE 42 TO ‘/u12/oradata/prod/dba_data01.dbf’;
46> SET NEWNAME FOR DATAFILE 44 TO ‘/u12/oradata/prod/undo01.dbf’;
47> SET NEWNAME FOR DATAFILE 45 TO ‘/u12/oradata/prod/INFRA34.dbf’;
48> SET NEWNAME FOR DATAFILE 46 TO ‘/u12/oradata/prod/INFRA35.dbf’;
49> RESTORE DATABASE from tag=TAG20101230T014722;
50> switch datafile all;
51> release channel CH00 ;
52> }

Komutumuzla backupı restore ediyoruz. Ben test ortamına dönmüş olduğum db’ im şu anda noarchivelog modda olduğundan dolayı herhangi bir recover işlemi yapmadan alter database open resetlogs ile komutu ile database’ i açtım. Ancak sizin elinizde archveloglarınız var ise recover işlemini istediğiniz loga kadar yapabilirsiniz. Tüm bu işlemler yapılırken alertlogda neler oluyor diye baktığımızda ;

Restore sırasında alertlog’ da aşağıdaki gibi satırlar görüyor olacaksınız.

Completed: alter database mount
Sun Feb 26 03:55:01 2012
Full restore complete of datafile 5 to datafile copy /u12/oradata/prod/INFRA01.dbf. Elapsed time: 2:03:26
checkpoint is 48612681769
Full restore complete of datafile 6 to datafile copy /u12/oradata/prod/INFRA02.dbf. Elapsed time: 2:03:26
checkpoint is 48612681769
Full restore complete of datafile 7 to datafile copy /u12/oradata/prod/INFRA03.dbf. Elapsed time: 2:03:26
checkpoint is 48612681769
Full restore complete of datafile 8 to datafile copy /u12/oradata/prod/INFRA04.dbf. Elapsed time: 2:03:26
checkpoint is 48612681769
Full restore complete of datafile 9 to datafile copy /u12/oradata/prod/INFRA08.dbf. Elapsed time: 2:03:26
checkpoint is 48612681769
Full restore complete of datafile 10 to datafile copy /u12/oradata/prod/INFRA07.dbf. Elapsed time: 2:03:26
checkpoint is 48612681769
Full restore complete of datafile 11 to datafile copy /u12/oradata/prod/INFRA06.dbf. Elapsed time: 2:03:26
checkpoint is 48612681769
Full restore complete of datafile 12 to datafile copy /u12/oradata/prod/INFRA05.dbf. Elapsed time: 2:03:26
checkpoint is 48612681769
Sun Feb 26 04:45:59 2012
Full restore complete of datafile 13 to datafile copy /u12/oradata/prod/INFRA09.dbf. Elapsed time: 0:50:58
checkpoint is 48612681769
Full restore complete of datafile 14 to datafile copy /u12/oradata/prod/INFRA10.dbf. Elapsed time: 0:50:58
checkpoint is 48612681769
Full restore complete of datafile 15 to datafile copy /u12/oradata/prod/INFRA11.dbf. Elapsed time: 0:50:58
checkpoint is 48612681769
Full restore complete of datafile 16 to datafile copy /u12/oradata/prod/INFRA12.dbf. Elapsed time: 0:50:58
checkpoint is 48612681769
Full restore complete of datafile 17 to datafile copy /u12/oradata/prod/INFRA13.dbf. Elapsed time: 0:50:58
checkpoint is 48612681769
Full restore complete of datafile 18 to datafile copy /u12/oradata/prod/INFRA14.dbf. Elapsed time: 0:50:58
checkpoint is 48612681769
Full restore complete of datafile 19 to datafile copy /u12/oradata/prod/INFRA15.dbf. Elapsed time: 0:50:58
checkpoint is 48612681769
Full restore complete of datafile 20 to datafile copy /u12/oradata/prod/INFRA16.dbf. Elapsed time: 0:50:58
checkpoint is 48612681769
Sun Feb 26 05:36:19 2012
Full restore complete of datafile 24 to datafile copy /u12/oradata/prod/INFRA20.dbf. Elapsed time: 0:50:20
checkpoint is 48612681769
Full restore complete of datafile 25 to datafile copy /u12/oradata/prod/INFRA21.dbf. Elapsed time: 0:50:20
checkpoint is 48612681769
Full restore complete of datafile 26 to datafile copy /u12/oradata/prod/INFRA22.dbf. Elapsed time: 0:50:20
checkpoint is 48612681769
Full restore complete of datafile 27 to datafile copy /u12/oradata/prod/INFRA23.dbf. Elapsed time: 0:50:20
checkpoint is 48612681769
Full restore complete of datafile 28 to datafile copy /u12/oradata/prod/INFRA24.dbf. Elapsed time: 0:50:20
checkpoint is 48612681769
Full restore complete of datafile 29 to datafile copy /u12/oradata/prod/INFRA25.dbf. Elapsed time: 0:50:20
checkpoint is 48612681769
Full restore complete of datafile 30 to datafile copy /u12/oradata/prod/INFRA26.dbf. Elapsed time: 0:50:20
checkpoint is 48612681769
Full restore complete of datafile 31 to datafile copy /u12/oradata/prod/INFRA27.dbf. Elapsed time: 0:50:20
checkpoint is 48612681769
Sun Feb 26 06:25:49 2012
Full restore complete of datafile 2 to datafile copy /u12/oradata/prod/proddb01.dbf. Elapsed time: 0:49:30
checkpoint is 48612681769
Sun Feb 26 06:28:53 2012
Full restore complete of datafile 32 to datafile copy /u12/oradata/prod/proddb02.dbf. Elapsed time: 0:52:34
checkpoint is 48612681769
Full restore complete of datafile 35 to datafile copy /u12/oradata/prod/INFRA31.dbf. Elapsed time: 0:52:35
checkpoint is 48612681769
Full restore complete of datafile 36 to datafile copy /u12/oradata/prod/INFRA32.dbf. Elapsed time: 0:52:35
checkpoint is 48612681769
Full restore complete of datafile 39 to datafile copy /u12/oradata/prod/INFRA07.dbf. Elapsed time: 0:52:35
checkpoint is 48612681769
Full restore complete of datafile 40 to datafile copy /u12/oradata/prod/INFRA31.dbf. Elapsed time: 0:52:35
checkpoint is 48612681769
Full restore complete of datafile 45 to datafile copy /u12/oradata/prod/INFRA34.dbf. Elapsed time: 0:52:35
checkpoint is 48612681769
Full restore complete of datafile 46 to datafile copy /u12/oradata/prod/INFRA35.dbf. Elapsed time: 0:52:35
checkpoint is 48612681769
Sun Feb 26 06:36:46 2012
Full restore complete of datafile 33 to datafile copy /u12/oradata/prod/INFRA28.dbf. Elapsed time: 0:07:52
checkpoint is 48612681769
Sun Feb 26 06:42:54 2012
Full restore complete of datafile 37 to datafile copy /u12/oradata/prod/proddb03.dbf. Elapsed time: 0:06:08
checkpoint is 48612681769
Sun Feb 26 06:44:25 2012
Full restore complete of datafile 34 to datafile copy /u12/oradata/prod/INFRA29.dbf. Elapsed time: 0:15:31
checkpoint is 48612681769
Full restore complete of datafile 41 to datafile copy /u12/oradata/prod/INFRA33.dbf. Elapsed time: 0:15:31
checkpoint is 48612681769
Full restore complete of datafile 3 to datafile copy /u12/oradata/prod/sysaux01.dbf. Elapsed time: 0:01:35
checkpoint is 48612681769
last deallocation scn is 560193
Sun Feb 26 06:44:38 2012
Full restore complete of datafile 42 to datafile copy /u12/oradata/prod/dba_data01.dbf. Elapsed time: 0:00:09
checkpoint is 48612681769
Sun Feb 26 06:45:07 2012
Full restore complete of datafile 1 to datafile copy /u12/oradata/prod/system01.dbf. Elapsed time: 0:00:42
checkpoint is 48612681769
last deallocation scn is 559080
Sun Feb 26 06:45:23 2012
Full restore complete of datafile 4 to datafile copy /u12/oradata/prod/users01.dbf. Elapsed time: 0:00:58
checkpoint is 48612681769
Sun Feb 26 06:46:34 2012
Full restore complete of datafile 38 to datafile copy /u12/oradata/prod/INFRA30.dbf. Elapsed time: 0:17:40
checkpoint is 48612681769
Sun Feb 26 06:51:13 2012
Full restore complete of datafile 44 to datafile copy /u12/oradata/prod/undo01.dbf. Elapsed time: 0:22:19
checkpoint is 48612681769
Sun Feb 26 06:56:48 2012
Full restore complete of datafile 21 to datafile copy /u12/oradata/prod/INFRA17.dbf. Elapsed time: 0:30:59
checkpoint is 48612681769
Sun Feb 26 06:57:36 2012
Full restore complete of datafile 22 to datafile copy /u12/oradata/prod/INFRA18.dbf. Elapsed time: 0:28:43
checkpoint is 48612681769
Full restore complete of datafile 23 to datafile copy /u12/oradata/prod/INFRA19.dbf. Elapsed time: 0:28:42
checkpoint is 48612681769

Restore işlemi bittikden sonra hemen açmayı denereseniz aşağıdaki gibi bir hatayla karşılaşacaksınız demektir ;

alter database open resetlogs
Tue Feb 28 12:04:45 2012
RESETLOGS after incomplete recovery UNTIL CHANGE 48612681769
Resetting resetlogs activation ID 2616612208 (0x9bf65570)
Tue Feb 28 12:04:45 2012
Errors in file /u01/sq/ora_1/oracle/admin/prod/udump/prod_ora_499740.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: ‘/u10/oradata/prod/rd/redo01.log’
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
ORA-344 signalled during: alter database open resetlogs…

Restore yaparken production ortamdaki filelerin pathleri ile test ortamına dönmeye çalıştığımız ortamın disk yapıları, pathleri aynı olmadığından dolayı dbf’ leri restore ederken file’ lerin yeni lokasyonlarını belirtmiştik. Şimdi benzer bir işlemide redolog lar için yapmak zorundayız. Çünkü şu anda database redologları productiondaki olması gereken pathlerde arıyor bulmaadığı içinde hata dönüyor. Bu sorunu gidermek için redologlarımızında yeni yerlerini göstererek rename ediyoruz;

Çalıştırdığım komutu ve alertlog çıktısını aynen kopyalıyorum ;

Tue Feb 28 12:08:02 2012
alter database rename file ‘/u10/oradata/prod/rd/redo01.log’ to ‘/u12/oradata/prod/redo01.log’
Tue Feb 28 12:08:02 2012
Completed: alter database rename file ‘/u10/oradata/prod/rd/redo01.log’ to ‘/u12/oradata/prod/redo01.log’
Tue Feb 28 12:08:10 2012
alter database rename file ‘/u10/oradata/prod/rd/redo02.log’ to ‘/u12/oradata/prod/redo02.log’
Completed: alter database rename file ‘/u10/oradata/prod/rd/redo02.log’ to ‘/u12/oradata/prod/redo02.log’
Tue Feb 28 12:08:10 2012
alter database rename file ‘/u10/oradata/prod/rd/redo03.log’ to ‘/u12/oradata/prod/redo03.log’
Completed: alter database rename file ‘/u10/oradata/prod/rd/redo03.log’ to ‘/u12/oradata/prod/redo03.log’
Tue Feb 28 12:08:10 2012
alter database rename file ‘/u10/oradata/prod/rd/redo07.log’ to ‘/u12/oradata/prod/redo07.log’
Completed: alter database rename file ‘/u10/oradata/prod/rd/redo07.log’ to ‘/u12/oradata/prod/redo07.log’
Tue Feb 28 12:08:10 2012
alter database rename file ‘/u10/oradata/prod/rd/redo05.log’ to ‘/u12/oradata/prod/redo05.log’
Completed: alter database rename file ‘/u10/oradata/prod/rd/redo05.log’ to ‘/u12/oradata/prod/redo05.log’
Tue Feb 28 12:08:10 2012
alter database rename file ‘/u10/oradata/prod/rd/redo06.log’ to ‘/u12/oradata/prod/redo06.log’
Completed: alter database rename file ‘/u10/oradata/prod/rd/redo06.log’ to ‘/u12/oradata/prod/redo06.log’
Tue Feb 28 12:08:10 2012
alter database rename file ‘/u10/oradata/prod/rd/redo04.log’ to ‘/u12/oradata/prod/redo04.log’
Completed: alter database rename file ‘/u10/oradata/prod/rd/redo04.log’ to ‘/u12/oradata/prod/redo04.log’

Bu işlemi de yaptıkdan sonra tekrar database’ i açmaya çalışalım ;

SQL>alter database open resetlogs;
Database altered.

Son olarak temp tablespace’ ini kontrol etmeniz de fayda var gerekiyorsa drop – create edebilirsiniz.

Böylelikle 1,5 yıl önce recovery catalog kullanılarak kartuşa alınmış olan bir bakupımızı, farklı bir sunucu üzerine restore etme işlemini tamamladık.

Be Sociable, Share!

2 comments

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir


− bir = 8