oracle数据库validate,11g rman validate验证数据库

11g rman validate验证数据库

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

11g rman中增加validate来检查数据库状况

可以针对全库、控制文件、参数文件等进行验证

validate database;

validate datafile 3;

validate spfile;

validate current controlfile;

validate backupset xxx;

validate tablespace system;

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

[oracle@localhost 2011_11_08]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Nov 8 11:08:39 2011

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

connected to target database: DB11 (DBID=1298141643)

--全库验证

--结果包括所有文件的状态、是否有坏块、空块、使用量、以及scn

--同时还有文件中数据和索引各占用的块等信息

--全库验证的结果默认包含参数文件和控制文件

RMAN> validate database;

Starting validate at 08-NOV-11

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=41 device type=DISK

channel ORA_DISK_1: starting validation of datafile

channel ORA_DISK_1: specifying datafile(s) for validation

input datafile file number=00001 name=/oracle/oradata/db11/db11/system01.dbf

input datafile file number=00002 name=/oracle/oradata/db11/db11/sysaux01.dbf

input datafile file number=00003 name=/oracle/oradata/db11/db11/undotbs01.dbf

input datafile file number=00004 name=/oracle/oradata/db11/db11/users01.dbf

channel ORA_DISK_1: validation complete, elapsed time: 00:00:35

List of Datafiles

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

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

1    OK     0              13729        87041           877449

File Name: /oracle/oradata/db11/db11/system01.dbf

Block Type Blocks Failing Blocks Processed

---------- -------------- ----------------

Data       0              58037

Index      0              12168

Other      0              3106

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

2    OK     0              17402        60183           877455

File Name: /oracle/oradata/db11/db11/sysaux01.dbf

Block Type Blocks Failing Blocks Processed

---------- -------------- ----------------

Data       0              10067

Index      0              7025

Other      0              25666

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

3    OK     0              112          9600            877455

File Name: /oracle/oradata/db11/db11/undotbs01.dbf

Block Type Blocks Failing Blocks Processed

---------- -------------- ----------------

Data       0              0

Index      0              0

Other      0              9488

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

4    OK     0              481          640             749391

File Name: /oracle/oradata/db11/db11/users01.dbf

Block Type Blocks Failing Blocks Processed

---------- -------------- ----------------

Data       0              15

Index      0              2

Other      0              142

channel ORA_DISK_1: starting validation of datafile

channel ORA_DISK_1: specifying datafile(s) for validation

including current control file for validation

including current SPFILE in backup set

channel ORA_DISK_1: validation complete, elapsed time: 00:00:01

List of Control File and SPFILE

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

File Type    Status Blocks Failing Blocks Examined

------------ ------ -------------- ---------------

SPFILE       OK     0              2

Control File OK     0              594

Finished validate at 08-NOV-11

RMAN> validate datafile 3;

Starting validate at 08-NOV-11

using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile

channel ORA_DISK_1: specifying datafile(s) for validation

input datafile file number=00003 name=/oracle/oradata/db11/db11/undotbs01.dbf

channel ORA_DISK_1: validation complete, elapsed time: 00:00:03

List of Datafiles

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

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

3    OK     0              112          9600            877455

File Name: /oracle/oradata/db11/db11/undotbs01.dbf

Block Type Blocks Failing Blocks Processed

---------- -------------- ----------------

Data       0              0

Index      0              0

Other      0              9488

Finished validate at 08-NOV-11

--验证参数文件

--比较简单

RMAN> validate spfile;

Starting validate at 08-NOV-11

using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile

channel ORA_DISK_1: specifying datafile(s) for validation

including current SPFILE in backup set

channel ORA_DISK_1: validation complete, elapsed time: 00:00:00

List of Control File and SPFILE

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

File Type    Status Blocks Failing Blocks Examined

------------ ------ -------------- ---------------

SPFILE       OK     0              2

Finished validate at 08-NOV-11

--验证控制文件

--与参数文件类似

RMAN> validate current controlfile;

Starting validate at 08-NOV-11

using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile

channel ORA_DISK_1: specifying datafile(s) for validation

including current control file for validation

channel ORA_DISK_1: validation complete, elapsed time: 00:00:01

List of Control File and SPFILE

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

File Type    Status Blocks Failing Blocks Examined

------------ ------ -------------- ---------------

Control File OK     0              594

Finished validate at 08-NOV-11

--使用list命令可以将现存在catalog中的backupset列出

--根据列出的backupset key可以对backupset进行验证

RMAN> list backupset;

List of Backup Sets

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

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

4       Full    954.85M    DISK        00:01:26     08-NOV-11

BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20111108T112236

Piece Name: /oracle/flash_recovery_area/DB11/backupset/2011_11_08/o1_mf_nnndf_TAG20111108T112236_7ck83wn9_.bkp

List of Datafiles in backup set 4

File LV Type Ckp SCN    Ckp Time  Name

---- -- ---- ---------- --------- ----

1       Full 878265     08-NOV-11 /oracle/oradata/db11/db11/system01.dbf

2       Full 878265     08-NOV-11 /oracle/oradata/db11/db11/sysaux01.dbf

3       Full 878265     08-NOV-11 /oracle/oradata/db11/db11/undotbs01.dbf

4       Full 878265     08-NOV-11 /oracle/oradata/db11/db11/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

5       Full    9.36M      DISK        00:00:02     08-NOV-11

BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20111108T112236

Piece Name: /oracle/flash_recovery_area/DB11/backupset/2011_11_08/o1_mf_ncsnf_TAG20111108T112236_7ck86x1h_.bkp

SPFILE Included: Modification time: 08-NOV-11

SPFILE db_unique_name: DB11

Control File Included: Ckp SCN: 878298       Ckp time: 08-NOV-11

RMAN> validate backupset 5;

Starting validate at 08-NOV-11

using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile backup set

channel ORA_DISK_1: reading from backup piece /oracle/flash_recovery_area/DB11/backupset/2011_11_08/o1_mf_ncsnf_TAG20111108T112236_7ck86x1h_.bkp

channel ORA_DISK_1: piece handle=/oracle/flash_recovery_area/DB11/backupset/2011_11_08/o1_mf_ncsnf_TAG20111108T112236_7ck86x1h_.bkp tag=TAG20111108T112236

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: validation complete, elapsed time: 00:00:01

Finished validate at 08-NOV-11

RMAN> validate tablespace system;

Starting validate at 08-NOV-11

using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile

channel ORA_DISK_1: specifying datafile(s) for validation

input datafile file number=00001 name=/oracle/oradata/db11/db11/system01.dbf

channel ORA_DISK_1: validation complete, elapsed time: 00:00:15

List of Datafiles

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

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

1    OK     0              13729        87041           878568

File Name: /oracle/oradata/db11/db11/system01.dbf

Block Type Blocks Failing Blocks Processed

---------- -------------- ----------------

Data       0              58037

Index      0              12168

Other      0              3106

channel ORA_DISK_1: starting validation of datafile

channel ORA_DISK_1: specifying datafile(s) for validation

including current control file for validation

including current SPFILE in backup set

channel ORA_DISK_1: validation complete, elapsed time: 00:00:01

List of Control File and SPFILE

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

File Type    Status Blocks Failing Blocks Examined

------------ ------ -------------- ---------------

SPFILE       OK     0              2

Control File OK     0              594

Finished validate at 08-NOV-11

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值