不完全恢复,操作过程,我的备份数据库出现此类问题。
SQL> host oerr ora 314
00314, 00000, "log %s of thread %s, expected sequence# %s doesn't match %s"
// *Cause: The online log is corrupted or is an old version.
// *Action: Find and install correct version of log or reset logs.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1266392 bytes
Variable Size 138415400 bytes
Database Buffers 25165824 bytes
Redo Buffers 2924544 bytes
Database mounted.
ORA-00314: log 2 of thread 1, expected sequence# 53 doesn't match 2
ORA-00312: online log 2 thread 1: '/opt/oracle/oradata/xxxdb/redo02.log'
select open_mode from v$database;
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
select group#,sequence#,archived,status from v$log;
SQL> host oerr ora 314
00314, 00000, "log %s of thread %s, expected sequence# %s doesn't match %s"
// *Cause: The online log is corrupted or is an old version.
// *Action: Find and install correct version of log or reset logs.
>alter database clear unarchived logfile group 1
ORA-01624: log 1 needed for crash recovery of thread 1
ORA-00312: online log 1 thread 1: '/dbase/oracle7/dbs/log1orac.dbf'
alter database clear unarchived logfile group 1
SQL> select group#,sequence#,archived,status from v$log;
GROUP# SEQUENCE# ARC STATUS
---------- ---------- --- ----------------
1 52 YES INACTIVE
3 51 YES INACTIVE
2 53 NO CURRENT
alter database clear unarchived logfile group 2
SQL> alter database clear unarchived logfile group 2
2 ;
alter database clear unarchived logfile group 2
*
ERROR at line 1:
ORA-01624: log 2 needed for crash recovery of instance xxxdb (thread 1)
ORA-00312: online log 2 thread 1: '/opt/oracle/oradata/xxxdb/redo02.log'
ORA-00314:
log string of thread string, expected sequence# string doesn't match string
Cause: The online log is corrupted or is an old version.
Action: Find and install correct version of log or reset logs.
SQL> alter system switch logfile;
alter system switch logfile
*
ERROR at line 1:
ORA-01109: database not open
SQL> select group#,sequence#,archived,status from v$log;
GROUP# SEQUENCE# ARC STATUS
---------- ---------- --- ----------------
1 52 YES INACTIVE
3 51 YES INACTIVE
2 53 NO CURRENT
SQL> recover database until cancel
ORA-00279: change 1692814 generated at 07/18/2010 21:10:36 needed for thread 1
ORA-00289: suggestion : /opt/oracle/oradata/archive/1_53_724438720.dbf
ORA-00280: change 1692814 for thread 1 is in sequence #53
Specify log: {=suggested | filename | AUTO | CANCEL}
auto
ORA-00308: cannot open archived log
'/opt/oracle/oradata/archive/1_53_724438720.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-00308: cannot open archived log
'/opt/oracle/oradata/archive/1_53_724438720.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/opt/oracle/oradata/xxxdb/system01.dbf'
SQL> alter database open resetlogs
2 ;
Sun Jul 18 23:55:36 2010
SMON: enabling cache recovery
Sun Jul 18 23:55:37 2010
Errors in file /opt/oracle/admin/xxxdb/udump/xxxdb_ora_4682.trc:
ORA-00600: internal error code, arguments: [2662], [0], [1692821], [0], [1693668], [8388617], [], []
Sun Jul 18 23:55:41 2010
Errors in file /opt/oracle/admin/xxxdb/udump/xxxdb_ora_4682.trc:
ORA-00600: internal error code, arguments: [2662], [0], [1692821], [0], [1693668], [8388617], [], []
Sun Jul 18 23:55:41 2010
Error 600 happened during db open, shutting down database
USER: terminating instance due to error 600
Instance terminated by USER, pid = 4682
ORA-1092 signalled during: alter database open resetlogs
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1266392 bytes
Variable Size 138415400 bytes
Database Buffers 25165824 bytes
Redo Buffers 2924544 bytes
Database mounted.
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS2
alter system set undo_tablespace='UNDOTBS1' scope=spfile;
show parameter undo
shutdown immediate
startup mount
show parameter undo
alter database open;
SQL> alter system set undo_tablespace='UNDOTBS1' scope=spfile;
show parameter undo
System altered.
SQL> shutdown immediate
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS2
SQL> startup mount
show parameter undo
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1266392 bytes
Variable Size 138415400 bytes
Database Buffers 25165824 bytes
Redo Buffers 2924544 bytes
Database mounted.
SQL>
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> alter database open;
Database altered.
参看:
http://www.chinaunix.net/jh/19/605827.html
4、拷贝有效的数据库的全备份,并不完全恢复数据库
可以采用获取最近的SCN的办法用until scn恢复或用until cnacel恢复
recover database until cancel
先选择auto,尽量恢复可以利用的归档日志,然后重新
recover database until cancel
这次输入cancel,完成不完全恢复,也就是说恢复两次。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9606200/viewspace-745630/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9606200/viewspace-745630/