Why Oracle control files are earlier than data files

Source: Internet
Author: User

As we all know, this article uses Oracle as the database server, non-archive mode, to install the relevant software locally, and store the relevant Oracle control files locally, and other files in the relevant disk array) we need to redo the relevant OS for it, so we cold all Oracle-related files to other machines.

When copying data files, system01.dbf encountered some problems and could not be copied, so before opening the database again, the control file had been) Check the status of all files, the error message returned when system01.dbf cannot be copied.

At that time, the decision was: Give up cold backup, reinstall the OS and directly reinstall Oracle, and then import data recovery. Fortunately, after the OS is reinstalled, the volume information of the disk array is automatically restored, and the backup software is de-tar and the control file is copied back. When the database is opened, the following message is displayed: oracle control files are older than data files and cannot be opened.

Recovery Process:

1. Try to use the old Oracle control file to restore the data file to an old state:

 
 
  1. SQL> recover database using BACKUP CONTROLFILE;  
  2. ORA-00279: ?? 2734997 (? 03/09/2010 15:53:32 ??) ???? 1 ????  
  3. ORA-00289: ??: /opt/app/oracle/product/10.2.0/dbs/arch1_6_709571253.dbf  
  4. ORA-00280: ?? 2734997 (???? 1) ??? #6 ?  

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

 
 
  1. cancel 

Media recovery has been canceled.

 
 
  1. SQL> recover database using BACKUP CONTROLFILE;  
  2. ORA-00279: ?? 2734997 (? 03/09/2010 15:53:32 ??) ???? 1 ????  
  3. ORA-00289: ??: /opt/app/oracle/product/10.2.0/dbs/arch1_6_709571253.dbf  
  4. ORA-00280: ?? 2734997 (???? 1) ??? #6 ?  

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

 
 
  1. cancel 

Media recovery has been canceled.

 
 
  1. SQL> alter database open resetlogs;  
  2. alter database open resetlogs  
  3. *  

Row 3 has an error:

 
 
  1. ORA-01113: ?? 1 ??????  
  2. ORA-01110: ???? 1: '/usr3/oradata1/sysdata/system01.dbf'  

2. Recreate the control file:

 
 
  1. SQL>alter database backup controlfile to trace; 

Find the corresponding trc file in the udump directory, first Delete the old control file, and then use the second statement to recreate the Oracle control file to recreate the control file:

SQL> CREATE CONTROLFILE REUSE DATABASE "CRNOPHQ" RESETLOGS NOARCHIVELOG

2 MAXLOGFILES 16

3 MAXLOGMEMBERS 3

4 MAXDATAFILES 1024

5 MAXINSTANCES 8

6 MAXLOGHISTORY 292

7. LOGFILE

8 GROUP 1 (

9 '/usr3/redo_log/redo01a. log ',

10'/usr3/redo_log/redo01b. Log'

11) SIZE 1024 M,

12 GROUP 2 (

13 '/usr3/redo_log/redo02a. log ',

14'/usr3/redo_log/redo02b. Log'

15) SIZE 1024 M,

16 GROUP 3 (

17 '/usr3/redo_log/redo03a. log ',

18 '/usr3/redo_log/redo03b. Log'

19) SIZE 1024 M

20 -- STANDBY LOGFILE

21. DATAFILE

22 '/usr3/oradata1/sysdata/system01.dbf ',

23'/usr3/oradata1/sysdata/undotbs01.dbf ',

24 '/usr3/oradata1/sysdata/sysaux01.dbf ',

25'/usr3/oradata1/sysdata/users01.dbf ',

26'/usr3/oradata1/sysdata/sysaux02.dbf ',

27 '/usr3/oradata1/sysdata/system02.dbf ',

28'/usr3/oradata1/sysdata/undotbs02.dbf ',

29'/usr3/oradata1/sysdata/undotbs03.dbf ',

30'/usr3/oradata1/sysdata/undotbs04.dbf ',

31 '/usr3/oradata1/sysdata/users02.dbf ',

32'/usr3/oradata1/data/dbs_d_crnophq01.dbf ',

33'/usr3/oradata1/data/dbs_ I _crnophq01.dbf ',

34'/usr3/oradata3/data/dbs_d_perf01.dbf ',

35'/usr3/oradata3/data/dbs_d_perf02.dbf ',

36'/usr3/oradata3/data/dbs_d_perf03.dbf ',

37 '/usr3/oradata3/data/dbs_d_perf04.dbf ',

38 '/usr3/oradata3/data/dbs_d_perf05.dbf ',

39 '/usr3/oradata2/data/dbs_ I _perf01.dbf ',

40'/usr3/oradata2/data/dbs_ I _perf02.dbf ',

41 '/usr3/oradata2/data/dbs_d_ne01.dbf ',

42'/usr3/oradata2/data/dbs_d_ne02.dbf ',

43 '/usr3/oradata2/data/dbs_d_ne03.dbf ',

44'/usr3/oradata2/data/dbs_d_ne04.dbf ',

45'/usr3/oradata2/data/dbs_ I _ne01.dbf ',

46'/usr3/oradata2/data/dbs_ I _ne02.dbf ',

47 '/usr3/oradata1/data/dbs_d_work01.dbf ',

48 '/usr3/oradata1/data/dbs_ I _work01.dbf ',

49 '/usr3/oradata1/data/dbs_d_rnopoa01.dbf ',

50'/usr3/oradata1/data/dbs_ I _rnopoa01.dbf ',

51 '/usr3/oradata2/data/dbs_d_spatial01.dbf ',

52 '/usr3/oradata2/data/dbs_ I _spatial01.dbf ',

53 '/usr3/oradata2/data/dbs_d_spatialmap01.dbf ',

54 '/usr3/oradata2/data/dbs_ I _spatialmap01.dbf'

55 character set ZHS16GBK

56;

The Oracle control file has been created.

 
 
  1. SQL> alter database open resetlogs; 

The database has been changed.

 
 
  1. SQL> select status,instance_name from v$instance;  
  2. STATUS INSTANCE_NAME  
  3. ------------ ----------------  
  4. OPEN CRNOPHQ  

So far, the recovery is complete.

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.