Oracle data recover Advisor自動回復的建議

來源:互聯網
上載者:User

從oracle 11gR1版本開始,oracle提供了資料庫資料檔案修複的建議方案,從而更好的讓使用者去選擇恢複方法

這就顯的越來越智能,只需要我們按照修複建議嚮導去做即可。

環境 Oracle Linux AS 5.5+oracle 11.2 (歸檔模式)

1、備份前的情況  

SQL> conn fmismain/fmismain

Connected.

SQL> select count(*) from xtdw;

COUNT(*)

----------

  29

SQL> select count(*) from xtdw3;

COUNT(*)

----------

  30

SQL>

2、rman備份

[oracle@ora1 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 22 09:13:05 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORA11G (DBID=4120198168)

RMAN> backup database format '/soft/bak/%U.full_bak';

Starting backup at 22-JUL-10

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=47 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current SPFILE in backup set

including current control file in backup set

input datafile file number=00001 name=+DGDATGA/ora11g/datafile/system.260.723998053

input datafile file number=00002 name=+DGDATGA/ora11g/datafile/sysaux.259.723998085

input datafile file number=00003 name=+DGDATGA/ora11g/datafile/undotbs1.258.723998109

input datafile file number=00005 name=+DGDATGA/ora11g/datafile/fmismain.266.724020873

input datafile file number=00004 name=+DGDATGA/ora11g/datafile/users.256.723998149

channel ORA_DISK_1: starting piece 1 at 22-JUL-10

channel ORA_DISK_1: finished piece 1 at 22-JUL-10

piece handle=/soft/bak/01ljdn3b_1_1.full_bak tag=TAG20100722T091419 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:07

Finished backup at 22-JUL-10

3.關閉資料庫,誤刪除一個資料庫的資料檔案

 手工刪除asm中的FMISMAIN.266.724020873檔案

3.啟動資料庫時報錯,提示找不到FMISMAIN.266.724020873資料檔案

[oracle@ora1 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 22 09:19:16 2010

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area  481259520 bytes

Fixed Size                  1337352 bytes

Variable Size             264243192 bytes

Database Buffers          209715200 bytes

Redo Buffers                5963776 bytes

Database mounted.

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

ORA-01110: data file 5: '+DGDATGA/ora11g/datafile/fmismain.266.724020873'

4.advise failure (data recover Advisor)

[oracle@ora1 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 22 09:39:42 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORA11G (DBID=4120198168, not open)

RMAN> list;

RMAN-00571: ===========================================================

本欄目更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found ";": expecting one of: "all, archivelog, backed, backuppiece, backupset, backup, completed, controlfilecopy, copy, datafilecopy, db_unique_name, device, expired, failure, foreign, global, incarnation, like, proxy, recoverable, restore, script, tag"

RMAN-01007: at line 2 column 1 file: standard input

RMAN>

RMAN> ;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found ";": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck, delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore, resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.