Oracle 11g RMAN ile gelen List Failure, Advise Failure ve Repair Failure

Oracle 11g RMAN ile gelen List Failure, Advise Failure ve Repair Failure. (DRA)

Datafile kaybettiniz. Block corruption oldu. veya Tablespace uçtu. Nasıl geri döndürüyordum düşünmenize gerek yok. RMAN ile konuşun gerisini o halletsin. RMAN kafasına bir soru takılırsa size sorar merak etmeyin. 11g RMAN ile gelen güzelliklerden olan Data Recovery Advisor (DRA) uygulamalı olarak yakından tanıyalım istedim.

İşte işlemler.

OS üzerinden /oracle/ora11g/data_TALIP/talip/myts01.dbf i uçurdum. Kapalı olan veritabanımızı açmaya çalışalım. 7 nolu datafile uçurduğum için hata alacağım.

SQL> startup;

ORACLE instance started.

Total System Global Area 2042241024 bytes

Fixed Size 1337548 bytes

Variable Size 1224738612 bytes

Database Buffers 805306368 bytes

Redo Buffers 10858496 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 7 – see DBWR trace file

ORA-01110: data file 7: ‘/oracle/ora11g/data_TALIP/talip/myts01.dbf’

SQL> select status from v$instance;

STATUS

————

MOUNTED

Bu durumda sadece “”MOUNTED” moda kadar veritabanımı açabilirim. Hemen RMAN’e geçelim. List failure ile problemlerimizin listesini alalım. 

RMAN> list failure;

List of Database Failures

=========================

Failure ID Priority Status Time Detected Summary

———- ——– ——— ————- ——-

78802 HIGH OPEN 14-JUL-11 One or more non-system datafiles are missing

 Bazı datafileların eksik olduğunu bize bildirdi. Bu konuda ne yapmamız gerektiğini RMAN’e soralım. Bize tavsiye versin 🙂 

RMAN> advise failure;

List of Database Failures

=========================

Failure ID Priority Status Time Detected Summary

———- ——– ——— ————- ——-

78802 HIGH OPEN 14-JUL-11 One or more non-system datafiles are missing

analyzing automatic repair options; this may take some time

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=129 device type=DISK

analyzing automatic repair options complete

Mandatory Manual Actions

========================

no manual actions available

Optional Manual Actions

=======================

1. If file /oracle/ora11g/data_TALIP/talip/myts01.dbf was unintentionally renamed or moved, restore it

Automated Repair Options

========================

Option Repair Description

—— ——————

1 Restore and recover datafile 7

Strategy: The repair includes complete media recovery with no data loss

Repair script: /oracle/diag/rdbms/talip/TALIP/hm/reco_3655040472.hm

RMAN sorunun çözümü için bize bir script önerdi. Bu scriptin içeriğinin ne olduğunu görelim;

RMAN> repair failure preview;

Strategy: The repair includes complete media recovery with no data loss

Repair script: /oracle/diag/rdbms/talip/TALIP/hm/reco_3655040472.hm

contents of repair script:

# restore and recover datafile

restore datafile 7;

recover datafile 7;

Evet tamda aradığımız kurtarma scriptini bize önerdi. O halde RMAN’ e onunla aynı fikirde olduğumuzu ve datafile ımızı kurtarmasını söyleyelim.

RMAN> repair failure;

Strategy: The repair includes complete media recovery with no data loss

Repair script: /oracle/diag/rdbms/talip/TALIP/hm/reco_3655040472.hm

contents of repair script:

# restore and recover datafile

restore datafile 7;

recover datafile 7;

Do you really want to execute the above repair (enter YES or NO)? yes

executing repair script

Starting restore at 14-JUL-11

using channel ORA_DISK_1

channel ORA_DISK_1: restoring datafile 00007

input datafile copy RECID=7 STAMP=756487675 file name=/oracle/yedek/TALIP/data_D-TALIP_I-1561456315_TS-MYTS_FNO-7_09mhe5f3

destination for restore of datafile 00007: /oracle/ora11g/data_TALIP/talip/myts01.dbf

channel ORA_DISK_1: copied datafile copy of datafile 00007

output file name=/oracle/ora11g/data_TALIP/talip/myts01.dbf RECID=0 STAMP=0

Finished restore at 14-JUL-11

Starting recover at 14-JUL-11

using channel ORA_DISK_1

starting media recovery

media recovery complete, elapsed time: 00:00:01

Finished recover at 14-JUL-11

repair failure complete

Do you want to open the database (enter YES or NO)? yes

database opened

RMAN>exit;

Herşey yolunda. RMAN herşeyi halletti. Veritabanımız emin ellerde 🙂

SQL> select status from v$instance;

STATUS

————

OPEN

Talip Hakan Öztürk