Oracle control file backup recovery noresetlogs recovery

Source: Internet
Author: User

Backup of control files can be performed in two formats: Text backup and binary backup.

Backup text format

SQL> alterdatabase backup controlfile to trace as '/bk/con. SQL ';

 

Databasealtered.

Backup binary format

SQL> alterdatabase backup controlfile to trace as '/bk/con. ctl ';

 

Databasealtered.

---- Add the as clause to customize the storage location

SQL>! Cp/etc/passwd/u01/tiger/oradata/orcl2/control01.ctl

 

SQL> altersystem swirch logfile;

Alter systemswirch logfile

*

ERROR at line 1:

ORA-02065: illegal options for ALTER SYSTEM

 

 

SQL> altersystem switch logfile;

Alter systemswitch logfile

*

ERROR at line 1:

ORA-03113: end-of-file on communication channel

SQL> conn/assysdba

Connected to anidle instance.

SQL> startup

Oracle instancestarted.

 

Total SystemGlobal Area 314572800 bytes

Fixed Size 1219136 bytes

VariableSize 109053376 bytes

DatabaseBuffers 197132288 bytes

RedoBuffers 7168000 bytes

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

We can find that there is a problem with the control file during the mount operation, so that we can restore the control file based on the text file of the control file backed up earlier.

Createcontrolfile reuse database "ORCL2" NORESETLOGS ARCHIVELOG

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

MAXINSTANCES 8

# MAXLOGHISTORY 292

LOGFILE

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

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

GROUP 3 '/u01/tiger/oradata/orcl2/redo03.log' SIZE50M

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

SQL> alterdatabase open;

Alter databaseopen

*

ERROR at line 1:

ORA-01113: file1 needs media recovery

ORA-01110: datafile 1: '/u01/tiger/oradata/orcl2/system01.dbf'

SQL> recoverdatabase;

Media recoverycomplete.

SQL> alterdatabase open;

Databasealtered.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.