利用trace重建控制文件

以下步骤,内容都在ora11g_ora_.trc文件中

CREATE CONTROLFILE REUSE DATABASE "ORA11G" NORESETLOGS  ARCHIVELOG

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

MAXINSTANCES 8

MAXLOGHISTORY 292

LOGFILE

GROUP 1 (

‘+DATA/ora11g/onlinelog/group_1.262.833721677‘,

‘+DATA/ora11g/onlinelog/group_1.263.833721679‘

) SIZE 50M BLOCKSIZE 512,

GROUP 2 (

‘+DATA/ora11g/onlinelog/group_2.264.833721681‘,

‘+DATA/ora11g/onlinelog/group_2.265.833721683‘

) SIZE 50M BLOCKSIZE 512,

GROUP 3 (

‘+DATA/ora11g/onlinelog/group_3.266.833721683‘,

‘+DATA/ora11g/onlinelog/group_3.267.833721685‘

) SIZE 50M BLOCKSIZE 512

-- STANDBY LOGFILE

DATAFILE

‘+DATA/ora11g/datafile/system.256.833721555‘,

‘+DATA/ora11g/datafile/sysaux.257.833721555‘,

‘+DATA/ora11g/datafile/undotbs1.258.833721555‘,

‘+DATA/ora11g/datafile/users.259.833721555‘,

‘+DATA/ora11g/datafile/example.269.833721711‘

CHARACTER SET WE8MSWIN1252

;

Control file created.

select group#,status from v$log;

select group#,member from v$logfile;

select group#,thread#,sequence# from v$archive;

recover database using backup controlfile until cancel;

ALTER DATABASE OPEN resetlogs;

ALTER TABLESPACE TEMP ADD TEMPFILE ‘+DATA/ora11g/tempfile/temp.268.833721699‘

SIZE 20971520  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;

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

示例

[email protected]>alter database backup controlfile to trace as ‘/u02/app/oracle/ctl.ctl‘;

Database altered.

[email protected]>CREATE CONTROLFILE REUSE DATABASE "ORA11G" NORESETLOGS  ARCHIVELOG

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

MAXINSTANCES 8

MAXLOGHISTORY 292

LOGFILE

GROUP 1 (

‘+DATA/ora11g/onlinelog/group_1.262.833721677‘,

‘+DATA/ora11g/onlinelog/group_1.263.833721679‘

) SIZE 50M BLOCKSIZE 512,

GROUP 2 (

‘+DATA/ora11g/onlinelog/group_2.264.833721681‘,

‘+DATA/ora11g/onlinelog/group_2.265.833721683‘

) SIZE 50M BLOCKSIZE 512,

GROUP 3 (

‘+DATA/ora11g/onlinelog/group_3.266.833721683‘,

‘+DATA/ora11g/onlinelog/group_3.267.833721685‘

) SIZE 50M BLOCKSIZE 512

-- STANDBY LOGFILE

DATAFILE

‘+DATA/ora11g/datafile/system.256.833721555‘,

‘+DATA/ora11g/datafile/sysaux.257.833721555‘,

‘+DATA/ora11g/datafile/undotbs1.258.833721555‘,

‘+DATA/ora11g/datafile/users.259.833721555‘,

‘+DATA/ora11g/datafile/example.269.833721711‘

CHARACTER SET WE8MSWIN1252

;  2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28

Control file created.

[email protected]>alter database mount;

ERROR at line 1:

ORA-01100: database already mounted

[email protected]>select group#,status from v$log;

GROUP# STATUS

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

1 CURRENT

3 UNUSED

2 UNUSED

[email protected]>select group#,member from v$logfile;

GROUP# MEMBER

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

1 +DATA/ora11g/onlinelog/group_1.262.833721677

1 +DATA/ora11g/onlinelog/group_1.263.833721679

3 +DATA/ora11g/onlinelog/group_3.266.833721683

3 +DATA/ora11g/onlinelog/group_3.267.833721685

2 +DATA/ora11g/onlinelog/group_2.264.833721681

2 +DATA/ora11g/onlinelog/group_2.265.833721683

[email protected]>recover database using backup controlfile until cancel;

ORA-00279: change 1109018 generated at 12/19/2013 12:11:13 needed for thread 1

ORA-00289: suggestion : +DATA

ORA-00280: change 1109018 for thread 1 is in sequence #1

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA/ora11g/onlinelog/group_1.262.833721677

Log applied.

Media recovery complete.

[email protected]>recover database using backup controlfile until cancel;

ORA-00279: change 1109019 generated at 12/19/2013 12:11:13 needed for thread 1

ORA-00289: suggestion : +DATA

ORA-00280: change 1109019 for thread 1 is in sequence #1

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA/ora11g/onlinelog/group_1.263.833721679

Log applied.

Media recovery complete.

[email protected]>ALTER DATABASE OPEN resetlogs;

Database altered.

[email protected]>ALTER TABLESPACE TEMP ADD TEMPFILE ‘+DATA/ora11g/tempfile/temp.268.833721699‘

SIZE 20971520  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;

Tablespace altered.

时间: 2024-10-13 17:14:11

利用trace重建控制文件的相关文章

oracle之 利用 controlfile trace文件重建控制文件

一. 11g RAC 重建控制文件 1. --"create controlfile"命令生成到追踪文件中:alter database backup controlfile to trace; 2. --确认追踪文件的路径:SQL> select value from v$diag_info where name='Default Trace File'; 3. -- 截取脚本 在追踪文件中找到并执行NORESETLOGS版本的"create controlfile&

【练习】trace文本重建控制文件

这个小练习是针对控制文件全部丢失后怎么能快速的重建一个控制文件,快速的起库 1.备份控制文件到trace下 SQL> alter database backup controlfile to trace; Database altered. 2.trace文本放在user_dump_dest的路径下 SQL> show parameter dump; NAME TYPE VALUE ------------------------------------ ----------- -------

【翻译自mos文章】在重建控制文件之前应该考虑的事情

在重建控制文件之前应该考虑的事情 来源于: Things to Consider Before Recreating the Controlfile (文档 ID 1475632.1) 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.1 and later Information in this document applies to any platform. 目的: 突出控制文件的重要性和在重建控制文件之前应该考虑的问题.

【翻译自mos文章】在重建控制文件之后,丢失了数据库补充日志信息(Missed Database Supplemental Log Information)

在重建控制文件之后,丢失了数据库补充日志信息(Missed Database Supplemental Log Information) 参考原文: Missed Database Supplemental Log Information After Recreate Controlfile In 10g Database. (Doc ID 1474952.1) 适用于: Oracle Server - Enterprise Edition - Version 10.1.0.2 and late

重建控制文件详解

http://note.youdao.com/share/?id=d3991566cad33723db8b92183dcd9161&type=note 完整图文最新版 创造"重建控制文件脚本"需要在mount或open下进行. alter database backup controlfile to trace as '/tmp/ctl..sql'; 执行"重建控制文件脚本"需要在nomount的时候. -- The following are curren

丢失全部控制文件,noresetlogs重建控制文件,alter database open

測试2: (1)一致性的全备 SQL> shutdown immediate; $ cp -rf $ORACLE_BASE/oradata/boss/*.dbf /oradata/bossbak/20140610allbackup $ cp -rf $ORACLE_BASE/oradata/boss/*.log /oradata/bossbak/20140610allbackup $ cp -rf $ORACLE_BASE/oradata/boss/*.ctl /oradata/bossbak/

丢失所有控制文件,noresetlogs重建控制文件,alter database open

测试2: (1)一致性的全备 SQL> shutdown immediate; $ cp -rf $ORACLE_BASE/oradata/boss/*.dbf /oradata/bossbak/20140610allbackup $ cp -rf $ORACLE_BASE/oradata/boss/*.log /oradata/bossbak/20140610allbackup $ cp -rf $ORACLE_BASE/oradata/boss/*.ctl /oradata/bossbak/

【翻译自mos中文文章】重建控制文件的方法

重建控制文件的方法 參考原文: How to Recreate a Controlfile (Doc ID 735106.1) 适用于: Oracle Database - Enterprise Edition - Version 9.0.1.0 and later Information in this document applies to any platform. 解决方式: 警告: 仅仅有遇到下列场景时,你才应该recreate 你的控制文件 1.全部的当前的控制文件copies 已经

ORACLE之重建控制文件

这里上传图片一直失败,想要查看详细信息和截图的可以下载附件 首先看一下控制文件的理解: 控制文件是一个二进制文件,用于记录数据库的物理结构.一个控制文件只属于一个数据库.创建数据库时,创建控制文件.当数据库的物理结构改变的时候,Oracle会更新控制文件,不能手动修改内容. 控制文件内容有:数据库名.数据库创建的时间戳.数据文件的名字和位置.redo log (联机重做日志文件)的名字和位置.表空间信息.当前日志的序列号.checkpoint 信息.最新的 RMAN备份信息.归档日志信息 当这些