Home > Database > Mysql Tutorial > oracle用控制文件旧备份恢复后数据库恢复总结

oracle用控制文件旧备份恢复后数据库恢复总结

WBOY
Release: 2016-06-07 17:41:24
Original
1259 people have browsed it

一oracle是如何判断控制文件的新旧1正常情况下控制文件seq#(controlfile_sequence#)大于等于数据文件头部记录的控制文件seq#(fhcsq)控制文件scn(controlfile_cha

 一 oracle是如何判断控制文件的新旧

1 正常情况下

控制文件seq#(controlfile_sequence#) 大于等于数据文件头部记录的控制文件seq#(fhcsq)

控制文件 scn(controlfile_change#)大于等于数据文件头部scn(fhscn)

如下所示:

SQL> select controlfile_type,controlfile_sequence#,controlfile_change#,checkpoint_change# from v$database;

 

CONTROL CONTROLFILE_SEQUENCE# CONTROLFILE_CHANGE# CHECKPOINT_CHANGE#

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

CURRENT                 16344          2781355383         2781355383

 

SQL> select hxfil,fhcsq,fhscn,fhrba_seq from x$kcvfh;

 hxfil :数据文件编号

 fhcsq:数据文件头部记录的控制文件seq号

 fhscn:数据文件头部的scn号

fhrba_seq:数据文件头部rba地址中的日志序列号

 

     HXFIL      FHCSQ FHSCN             FHRBA_SEQ

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

         1      16343 2781355383               22

         2      16343 2781355383               22

         3      16343 2781355383               22

         4      16343 2781355383               22

         5      16343 2781355383               22

         6      16343 2781355383               22

         7      16343 2781355383               22

         8      16343 2781355383               22

        11      16343 2781355383               22

        12      16343 2781355383               22

        13      16343 2781355383               22

 

11 rows selected.

2 用旧控制文件恢复后的情况如下:

RMAN> restore controlfile from '/oracle/app/db1/dbs/01nve87c_1_1';

 

Starting restore at 14-JAN-13

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=211 devtype=DISK

 

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:04

output filename=/oracle/CRM2/CRM/control01.ctl

output filename=/oracle/CRM2/CRM/control02.ctl

Finished restore at 14-JAN-13

       

SQL> select controlfile_type,controlfile_sequence#,controlfile_change#,checkpoint_change# from v$database;

 

CONTROL CONTROLFILE_SEQUENCE# CONTROLFILE_CHANGE# CHECKPOINT_CHANGE#

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

BACKUP                  16294          2781355207         2781347284

 

SQL> select hxfil,fhcsq,fhscn,fhrba_seq from x$kcvfh;

 

     HXFIL      FHCSQ FHSCN             FHRBA_SEQ

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

         1      16343 2781355383               22

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template