1、在非归档中,联机重做日志文件没丢失,
SQL> startup;
ORACLE instance started.Total System Global Area 243269632 bytes
Fixed Size 1218748 bytes
Variable Size 79693636 bytes
Database Buffers 159383552 bytes
Redo Buffers 2973696 bytes
ORA-00205: error in identifying control file, check alert log for more info
SQL> archive log list
ORA-01507: database not mounted
SQL> select * from v$database;
select * from v$database
*
ERROR at line 1:
ORA-01507: database not mounted
-- noresetlogs一定要带这个参数
SQL> create controlfile reuse database orcl noarchivelog noresetlogs
2 maxlogfiles 16
3 maxlogmembers 3
4 maxdatafiles 100
5 maxinstances 8
6 maxloghistory 292
7 datafile
8 '/u1/oracle/oradata/orcl/system01.dbf',
9 '/u1/oracle/oradata/orcl/undotbs01.dbf',
10 '/u1/oracle/oradata/orcl/sysaux01.dbf',
11 '/u1/oracle/oradata/orcl/users01.dbf',
12 '/u1/oracle/oradata/orcl/example01.dbf'
13 logfile
14 GROUP 1 '/u1/oracle/oradata/orcl/redo01.log' SIZE 50M,
15 GROUP 2 '/u1/oracle/oradata/orcl/redo02.log' SIZE 50M,
16 GROUP 3 '/u1/oracle/oradata/orcl/redo03.log' SIZE 50M
17 character set AL32UTF8;
Control file created.
SQL> alter database open;
Database altered.
SQL>
2、在归档模式下
1)首先备份控制文件
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 8
Next log sequence to archive 10
Current log sequence 10
SQL> show parameter control_f
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_