In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "Oracle how to use backup control files", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Oracle how to use backup control files" this article.
Example 1: cold backup of all data files-- > New tablespace-> backup control files (log files intact)
Experimental environment:
The current control file is corrupted, the newly created tablespace is corrupted, there is no backup of the data file in the cold backup data file, but there are related records in the control file and online log; because the control file is corrupted, you can only use the backed-up control file for recovery.
-- View existing tablespaces in the database
SYS@seiang11g > select * from v$tablespace
TS# NAME INC BIG FLA ENC
0 SYSTEM YES NO YES
1 SYSAUX YES NO YES
2 UNDOTBS1 YES NO YES
4 USERS YES NO YES
3 TEMP NO NO YES
6 EXAMPLE YES NO YES
7 RMAN_CATALOG YES NO YES
8 SEIANG YES NO YES
9 WJQ YES NO YES
10 WJQBEST YES NO YES
-- the serial number of the current log is 3.
SYS@seiang11g > select group#,sequence#,status from v$log
GROUP# SEQUENCE# STATUS
1 1 INACTIVE
2 2 INACTIVE
3 3 CURRENT
Create a new tablespace test
SYS@seiang11g > create tablespace test datafile'/ u01Accord size OraDB11g size 5m
Tablespace created.
-- back up the control file after the tablespace is created
SYS@seiang11g > alter database backup controlfile to'/ u01qqappAccord oradataOnOraDB11gcontrol.bak'
Database altered.
-- View the diversified paths of the control files in the database
SYS@seiang11g > show parameter control
NAME TYPE VALUE
-
Control_file_record_keep_time integer 14
Control_files string / u01/app/oracle/oradata/OraDB1
1g/control01.ctl, / u01/app/ora
Cle/fast_recovery_area/OraDB11
G/control02.ctl
Control_management_pack_access string DIAGNOSTIC+TUNING
-- 4 create a table test4 under the seiang user, belonging to the test tablespace
SYS@seiang11g > create table seiang.test4 (ID number,name varchar2 (30)) tablespace test
Table created.
Insert two pieces of data into the test4 table and submit
SYS@seiang11g > insert into seiang.test4 values (1001 recording wjq')
1 row created.
SYS@seiang11g > insert into seiang.test4 values (1002)
1 row created.
SYS@seiang11g > commit
Commit complete.
-- perform log switching, and the record information in the table you just inserted has been archived
SYS@seiang11g > alter system switch logfile
System altered.
-- View the current log serial number as 4
SYS@seiang11g > select group#,sequence#,status from v$log
GROUP# SEQUENCE# STATUS
1 4 CURRENT
2 2 INACTIVE
3 3 ACTIVE
-- insert two more pieces of data into the test4 table, but the last two inserted data are recorded in the current log file 1
SYS@seiang11g > insert into seiang.test4 values (1003 recorder wjqgood')
1 row created.
SYS@seiang11g > insert into seiang.test4 values (1004jqbest`)
1 row created.
SYS@seiang11g > commit
Commit complete.
-- View the contents of the data in the test4 table
SYS@seiang11g > select * from seiang.test4
ID NAME
1001 wjq
1002 seiang
1003 wjqgood
1004 wjqbest
-- simulate corruption or loss of data files in test tablespaces and control file corruption
SYS@seiang11g > host rm / u01/app/oracle/oradata/OraDB11g/test01.dbf
SYS@seiang11g > host rm / u01/app/oracle/oradata/OraDB11g/control01.ctl
SYS@seiang11g > host rm / u01/app/oracle/fast_recovery_area/OraDB11g/control02.ctl
-- the database is down and cannot be accessed
SYS@seiang11g > select * from seiang.test4
Select * from seiang.test4
*
ERROR at line 1:
ORA-03135: connection lost contact
Process ID: 17679
Session ID: 34 Serial number: 531
-- restore all data files and control files and prepare for incomplete recovery
SYS@seiang11g > host cp / u01/app/oracle/UMAN_Backup/*.dbf / u01/app/oracle/oradata/OraDB11g/
SYS@seiang11g > host cp / u01/app/oracle/oradata/OraDB11g/control.bak / u01/app/oracle/oradata/OraDB11g/control01.ctl
SYS@seiang11g > host cp / u01/app/oracle/oradata/OraDB11g/control.bak / u01/app/oracle/fast_recovery_area/OraDB11g/control02.ctl
-- check the SCN recorded in the control file and data file header, and find that the test01.dbf data file header is not recorded.
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile
FILE# CHECKPOINT_CHANGE# NAME
-
1 1981768 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1981768 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1981768 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1981768 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1981768 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1981768 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1981768 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1981768 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1981768 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 1986000 / u01/app/oracle/oradata/OraDB11g/test01.dbf
SYS@seiang11g >
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile_header
FILE# CHECKPOINT_CHANGE# NAME
-
1 1913765 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1913765 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1913765 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1913765 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1913765 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1913765 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1913765 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1913765 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1913765 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 0
As can be seen:
① file10 records as test01.dbf in the control file, but the corresponding data file 10 does not exist.
The SCN of the data backed up by ② is older than the control file SCN.
-- View the data files that need to be recovered
SYS@seiang11g > select * from v$recover_file
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
--
1 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
2 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
3 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
4 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
5 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
6 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
7 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
8 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
9 ONLINE ONLINE UNKNOWN ERROR 1913765 02-AUG-17
10 ONLINE ONLINE FILE NOT FOUND 0
-- try to do a full restore. Prompt to use the backup control file to restore.
SYS@seiang11g > recover database
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
-- use the backup control file to restore, and an error occurred
SYS@seiang11g > recover database using backup controlfile
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 10:'/ u01 *
ORA-01157: cannot identify/lock data file 10-see DBWR trace file
ORA-01110: data file 10:'/ u01 *
This error is due to the fact that there is no abcd tablespace in the old backup, but as long as the abcd is recorded in the control file, it is easy to create an empty file of datafile, which can be filled by the log file recover (roll forward).
-create a new data file
SYS@seiang11g > alter database create datafile'/ u01ameApplains orraDB11g Greater OraDB11gUnix Test01.dbf'
Database altered.
-- check the SCN recorded in the control file and data file header again
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile
FILE# CHECKPOINT_CHANGE# NAME
-
1 1981768 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1981768 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1981768 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1981768 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1981768 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1981768 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1981768 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1981768 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1981768 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 1986000 / u01/app/oracle/oradata/OraDB11g/test01.dbf
10 rows selected.
SYS@seiang11g >
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile_header
FILE# CHECKPOINT_CHANGE# NAME
-
1 1913766 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1913766 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1913766 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1913766 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1913766 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1913766 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1913766 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1913766 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1913766 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 1985999 / u01/app/oracle/oradata/OraDB11g/test01.dbf
-- use the backup control file again for recovery
SYS@seiang11g > recover database using backup controlfile
ORA-00279: change 1913766 generated at 08/02/2017 11:12:22 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950971495_1.log
ORA-00280: change 1913766 for thread 1 is in sequence # 1
Specify log: {= suggested | filename | AUTO | CANCEL}
Auto (select auto because the required logs have been archived)
ORA-00279: change 1914386 generated at 08/02/2017 14:48:59 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950971495_2.log
ORA-00280: change 1914386 for thread 1 is in sequence # 2
ORA-00278: log file'/ u01 ActionPlus oracleplains archetype 1, 950971495, 1.log' no longer needed for this recovery
ORA-00279: change 1914402 generated at 08/02/2017 14:59:56 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950972396_1.log
ORA-00280: change 1914402 for thread 1 is in sequence # 1
ORA-00279: change 1936446 generated at 08/02/2017 15:39:52 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950972396_2.log
ORA-00280: change 1936446 for thread 1 is in sequence # 2
ORA-00278: log file'/ u01 ActionPlus oracleplains archetype 1, 950972396, 1.log' no longer needed for this recovery
ORA-00279: change 1937042 generated at 08/02/2017 15:49:42 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950972396_3.log
ORA-00280: change 1937042 for thread 1 is in sequence # 3
ORA-00278: log file'/ u01 no longer needed for this recovery appplash oracleplains archetype 1 '950972396' log'
ORA-00279: change 1937100 generated at 08/02/2017 15:51:34 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950972396_4.log
ORA-00280: change 1937100 for thread 1 is in sequence # 4
ORA-00278: log file'/ u01 ActionPlus oracleplains archetype 1o9509723963.log' no longer needed for this recovery
ORA-00279: change 1937111 generated at 08/02/2017 16:23:53 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_1.log
ORA-00280: change 1937111 for thread 1 is in sequence # 1
ORA-00279: change 1955524 generated at 08/02/2017 22:00:32 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_2.log
ORA-00280: change 1955524 for thread 1 is in sequence # 2
ORA-00278: log file'/ u01 ActionPlus oracleplains archetype 1, 950977433, 1.log' no longer needed for this recovery
ORA-00279: change 1981768 generated at 08/03/2017 08:19:54 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_3.log
ORA-00280: change 1981768 for thread 1 is in sequence # 3
ORA-00278: log file'/ u01 no longer needed for this recovery appplash oracle no longer needed for this recovery archetype 1o950977433
ORA-00279: change 1986580 generated at 08/03/2017 10:00:19 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_4.log
ORA-00280: change 1986580 for thread 1 is in sequence # 4
ORA-00278: log file'/ u01 ActionPlus oracle no longer needed for this recovery archetype 1, 950977433, 3.log'
ORA-00308: cannot open archived log' / u01 ActionPlus oracleThree archetypes 1 "950977433" 4.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
This error occurred because the current log file has not been archived, so the current log file is next used for recovery
SYS@seiang11g > recover database using backup controlfile
ORA-00279: change 1986580 generated at 08/03/2017 10:00:19 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_4.log
ORA-00280: change 1986580 for thread 1 is in sequence # 4
Specify log: {= suggested | filename | AUTO | CANCEL}
/ u01/app/oracle/oradata/OraDB11g/redo01.log (current log file)
Log applied.
Media recovery complete.
SYS@seiang11g >
-- restore completed, use resetlogs to open the database
SYS@seiang11g > alter database open resetlogs
Database altered.
-- check the SCN of the header record of the control file and the data file
SYS@seiang11g > select file#,checkpoint_change# from v$datafile
FILE# CHECKPOINT_CHANGE#
--
1 1986883
2 1986883
3 1986883
4 1986883
5 1986883
6 1986883
7 1986883
8 1986883
9 1986883
10 1986883
SYS@seiang11g > select file#,checkpoint_change# from v$datafile_header
FILE# CHECKPOINT_CHANGE#
--
1 1986883
2 1986883
3 1986883
4 1986883
5 1986883
6 1986883
7 1986883
8 1986883
9 1986883
10 1986883
-- confirm that all the data in the test4 table has been restored successfully
SYS@seiang11g > select * from seiang.test4
ID NAME
1001 wjq
1002 seiang
1003 wjqgood
1004 wjqbest
Example 2: cold backup of all data files-> backup control files-- > create a new tablespace (log files are intact)
Experimental environment:
The current control file is corrupted, the newly created tablespace is corrupted, there is no backup of the data file in the cold backup data file, and there is no record of the tablespace in the control file, but there are related records in the online log; because the control file is corrupted, you can only use the backed-up control file for recovery.
-- View tablespaces that already exist in the database
SYS@seiang11g > select * from v$tablespace
TS# NAME INC BIG FLA ENC
0 SYSTEM YES NO YES
1 SYSAUX YES NO YES
2 UNDOTBS1 YES NO YES
4 USERS YES NO YES
3 TEMP NO NO YES
6 EXAMPLE YES NO YES
7 RMAN_CATALOG YES NO YES
8 SEIANG YES NO YES
9 WJQ YES NO YES
10 WJQBEST YES NO YES
-- backup control files
SYS@seiang11g > alter database backup controlfile to'/ u01According to orraDB11gcontrol.bak1'
Database altered.
-create a tablespace comsys that is recorded in the current log redo01.log
SYS@seiang11g > create tablespace comsys datafile'/ u01 size size
Tablespace created.
-- create a table test4 under the seiang user, belonging to the comsys tablespace
SYS@seiang11g > create table seiang.test4 (age number,address varchar2 (10)) tablespace comsys
Table created.
Insert two pieces of data into the test4 table and submit
SYS@seiang11g > insert into seiang.test4 values (23 million beiding')
1 row created.
SYS@seiang11g > insert into seiang.test4 values (25PhoneShaanghai`)
1 row created.
SYS@seiang11g > commit
Commit complete.
SYS@seiang11g > select * from seiang.test4
AGE ADDRESS
--
23 beijing
25 shanghai
-- the serial number of the current log is 1.
SYS@seiang11g > select group#,sequence#,status from v$log
GROUP# SEQUENCE# STATUS
1 1 CURRENT
2 0 UNUSED
3 0 UNUSED
-- simulate the loss or corruption of comsys01.dbf data files and control file corruption
SYS@seiang11g > host rm / u01/app/oracle/oradata/OraDB11g/comsys01.dbf
SYS@seiang11g > shutdown abort
ORACLE instance shut down.
-restore control files and data files from backed-up files
SYS@seiang11g > host cp / u01/app/oracle/oradata/OraDB11g/control.bak1 / u01/app/oracle/oradata/OraDB11g/control01.ctl
SYS@seiang11g > host cp / u01/app/oracle/oradata/OraDB11g/control.bak1 / u01/app/oracle/fast_recovery_area/OraDB11g/control02.ctl
SYS@seiang11g > host cp / u01/app/oracle/UMAN_Backup/*.dbf / u01/app/oracle/oradata/OraDB11g
SYS@seiang11g > startup
ORACLE instance started.
Total System Global Area 1252663296 bytes
Fixed Size 2252824 bytes
Variable Size 788533224 bytes
Database Buffers 452984832 bytes
Redo Buffers 8892416 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
-- check the control file and data file header and find that there are no records related to the comsys tablespace
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile
FILE# CHECKPOINT_CHANGE# NAME
-
1 1986883 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1986883 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1986883 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1986883 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1986883 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1986883 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1986883 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1986883 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1986883 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile_header
FILE# CHECKPOINT_CHANGE# NAME
-
1 1913765 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1913765 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1913765 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1913765 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1913765 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1913765 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1913765 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1913765 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1913765 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
-- try a full recovery, prompting you to use the backup control files for recovery
SYS@seiang11g > recover database
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
-- restore using backup control files
SYS@seiang11g > recover database using backup controlfile
ORA-00279: change 1913766 generated at 08/02/2017 11:12:22 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950971495_1.log
ORA-00280: change 1913766 for thread 1 is in sequence # 1
Specify log: {= suggested | filename | AUTO | CANCEL}
Auto (the log has been archived, so choose auto)
ORA-00279: change 1914386 generated at 08/02/2017 14:48:59 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950971495_2.log
ORA-00280: change 1914386 for thread 1 is in sequence # 2
ORA-00278: log file'/ u01 ActionPlus oracleplains archetype 1, 950971495, 1.log' no longer needed for this recovery
ORA-00279: change 1914402 generated at 08/02/2017 14:59:56 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950972396_1.log
ORA-00280: change 1914402 for thread 1 is in sequence # 1
ORA-00279: change 1936446 generated at 08/02/2017 15:39:52 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950972396_2.log
ORA-00280: change 1936446 for thread 1 is in sequence # 2
ORA-00278: log file'/ u01 ActionPlus oracleplains archetype 1, 950972396, 1.log' no longer needed for this recovery
ORA-00279: change 1937042 generated at 08/02/2017 15:49:42 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950972396_3.log
ORA-00280: change 1937042 for thread 1 is in sequence # 3
ORA-00278: log file'/ u01 no longer needed for this recovery appplash oracleplains archetype 1 '950972396' log'
ORA-00279: change 1937100 generated at 08/02/2017 15:51:34 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950972396_4.log
ORA-00280: change 1937100 for thread 1 is in sequence # 4
ORA-00278: log file'/ u01 ActionPlus oracleplains archetype 1o9509723963.log' no longer needed for this recovery
ORA-00279: change 1937111 generated at 08/02/2017 16:23:53 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_1.log
ORA-00280: change 1937111 for thread 1 is in sequence # 1
ORA-00279: change 1955524 generated at 08/02/2017 22:00:32 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_2.log
ORA-00280: change 1955524 for thread 1 is in sequence # 2
ORA-00278: log file'/ u01 ActionPlus oracleplains archetype 1, 950977433, 1.log' no longer needed for this recovery
ORA-00279: change 1981768 generated at 08/03/2017 08:19:54 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_3.log
ORA-00280: change 1981768 for thread 1 is in sequence # 3
ORA-00278: log file'/ u01 no longer needed for this recovery appplash oracle no longer needed for this recovery archetype 1o950977433
ORA-00279: change 1986580 generated at 08/03/2017 10:00:19 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_950977433_4.log
ORA-00280: change 1986580 for thread 1 is in sequence # 4
ORA-00278: log file'/ u01 ActionPlus oracle no longer needed for this recovery archetype 1, 950977433, 3.log'
ORA-00279: change 1986880 generated at 08/03/2017 10:33:47 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_951042827_1.log
ORA-00280: change 1986880 for thread 1 is in sequence # 1
ORA-00308: cannot open archived log' / u01 ActionPlus oracleArchery archetype 1 "951042827" 1.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
This error occurred because the current log file has not been archived, so the current log file is next used for recovery
SYS@seiang11g > recover database using backup controlfile
ORA-00279: change 1986880 generated at 08/03/2017 10:33:47 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_951042827_1.log
ORA-00280: change 1986880 for thread 1 is in sequence # 1
Specify log: {= suggested | filename | AUTO | CANCEL}
/ u01/app/oracle/oradata/OraDB11g/redo01.log (current log file)
ORA-00283: recovery session canceled due to errors
ORA-01244: unnamed datafile (s) added to control file by media recovery
ORA-01110: data file 10:'/ u01 *
(from the current log file, we found relevant records about comsys tablespaces)
ORA-01112: media recovery not started
When you restore using the backed-up control file again, the following error occurs
SYS@seiang11g > recover database using backup controlfile
ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 10 is unknown-rename to correct file
ORA-01110: data file 10:'/ u01 apprentice oracle.product11.2.0; dbhomeowners 1 and dbsUniNAMED00010'
ORA-01157: cannot identify/lock data file 10-see DBWR trace file
ORA-01111: name for data file 10 is unknown-rename to correct file
ORA-01110: data file 10:'/ u01 apprentice oracle.product11.2.0; dbhomeowners 1 and dbsUniNAMED00010'
-- check the control file and data file headers, and have relevant records about comsys tablespaces
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile
FILE# CHECKPOINT_CHANGE# NAME
-
1 1986883 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1986883 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1986883 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1986883 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1986883 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1986883 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1986883 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1986883 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1986883 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 1988334 / u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAME
D00010
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile_header
FILE# CHECKPOINT_CHANGE# NAME
-
1 1988336 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1988336 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1988336 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1988336 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1988336 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1988336 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1988336 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1988336 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1988336 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 0
-- create data files and rename data files with unknown records in the control file
SYS@seiang11g > alter database create datafile'/ u01ActionApplicationoracleproduce 11.2.0Ondbhomeowners 1anddbsandUniNAMED00010'
2 as'/ u01Accord oradataplink OraDB11gUniplex comsys01.dbf'
Database altered.
(current log file)
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile
FILE# CHECKPOINT_CHANGE# NAME
-
1 1986883 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1986883 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1986883 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1986883 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1986883 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1986883 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1986883 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1986883 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1986883 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 1988334 / u01/app/oracle/oradata/OraDB11g/comsys01.dbf
-- check the control file and data file header again
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile_header
FILE# CHECKPOINT_CHANGE# NAME
-
1 1988336 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1988336 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1988336 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1988336 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1988336 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1988336 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1988336 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1988336 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1988336 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 1988334 / u01/app/oracle/oradata/OraDB11g/comsys01.dbf
-- restore using the backup control file and the current log again
SYS@seiang11g > recover database using backup controlfile
ORA-00279: change 1988334 generated at 08/03/2017 10:53:39 needed for thread 1
ORA-00289: suggestion: / u01/app/oracle/arch/arch_1_951042827_1.log
ORA-00280: change 1988334 for thread 1 is in sequence # 1
Specify log: {= suggested | filename | AUTO | CANCEL}
/ u01/app/oracle/oradata/OraDB11g/redo01.log
Log applied.
Media recovery complete.
-- after the recovery is complete, open the database using resetlogs
SYS@seiang11g > alter database open resetlogs
Database altered.
-- View the control file is consistent with the data file header SCN
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile
FILE# CHECKPOINT_CHANGE# NAME
-
1 1989738 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1989738 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1989738 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1989738 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1989738 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1989738 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1989738 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1989738 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1989738 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 1989738 / u01/app/oracle/oradata/OraDB11g/comsys01.dbf
SYS@seiang11g > select file#,checkpoint_change#,name from v$datafile_header
FILE# CHECKPOINT_CHANGE# NAME
-
1 1989738 / u01/app/oracle/oradata/OraDB11g/system01.dbf
2 1989738 / u01/app/oracle/oradata/OraDB11g/sysaux01.dbf
3 1989738 / u01/app/oracle/oradata/OraDB11g/undotbs01.dbf
4 1989738 / u01/app/oracle/oradata/OraDB11g/users01.dbf
5 1989738 / u01/app/oracle/oradata/OraDB11g/example01.dbf
6 1989738 / u01/app/oracle/oradata/OraDB11g/rman01.dbf
7 1989738 / u01/app/oracle/oradata/OraDB11g/seiang01.dbf
8 1989738 / u01/app/oracle/oradata/OraDB11g/wjq01.dbf
9 1989738 / u01/app/oracle/oradata/OraDB11g/wjqbest01.dbf
10 1989738 / u01/app/oracle/oradata/OraDB11g/comsys01.dbf
-- View data records in the restored test4 table
SYS@seiang11g > select * from seiang.test4
AGE ADDRESS
--
23 beijing
25 shanghai
The above is all the contents of the article "how to use backup Control Files in Oracle". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.