Home > Database > Mysql Tutorial > Oracle控制文件备份恢复 resetlogs方式

Oracle控制文件备份恢复 resetlogs方式

WBOY
Release: 2016-06-07 17:19:37
Original
1001 people have browsed it

alter databasebackup controfile to trace as

alter databasebackup controfile to trace as '/bk/col.sql';

一致性停库破坏日志文件和控制文件

启动数据库

SQL> startup

Oracle instancestarted.

 

Total SystemGlobal Area  314572800 bytes

Fixed Size                  1219136 bytes

VariableSize             113247680 bytes

DatabaseBuffers          192937984 bytes

RedoBuffers                7168000 bytes

ORA-00205: errorin identifying control file, check alert log for more info

因为没有控制文件所以会出205错误

我们根据备份的控制文件信息重新创建控制文件

CREATECONTROLFILE REUSE DATABASE "ORCL2" RESETLOGS  ARCHIVELOG

    MAXLOGFILES 16

    MAXLOGMEMBERS 3

    MAXDATAFILES 100

    MAXINSTANCES 8

    MAXLOGHISTORY 292

LOGFILE

  GROUP 1'/u01/tiger/oradata/orcl2/redo01.log' SIZE 50M,

  GROUP 2'/u01/tiger/oradata/orcl2/redo02.log' SIZE 50M,

  GROUP 3'/u01/tiger/oradata/orcl2/redo03.log' SIZE 50M

DATAFILE

  '/u01/tiger/oradata/orcl2/system01.dbf',

  '/u01/tiger/oradata/orcl2/tiger.dbf',

  '/u01/tiger/oradata/orcl2/sysaux01.dbf',

  '/u01/tiger/oradata/orcl2/users01.dbf',

  '/u01/tiger/oradata/orcl2/undotbs02.dbf',

  '/u01/tiger/oradata/orcl2/undotbs01',

  '/u01/tiger/oradata/orcl2/tiger01.dbf'

CHARACTER SETZHS16GBK

;

因为之前也没有了redo日志文件所以重启数据库的时候用resetlogs参数

alter databaseopen resetlogs

linux

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