Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

43

积分

0

好友

0

主题
1#
发表于 2012-3-28 11:27:45 | 查看: 4084| 回复: 1
今天一同事做rman 恢复操作。rac节点数据恢复到某一测试单机数据库:
restore成功。但在recover的时候始终查找备份前的归档(备份为0级备份)。通过v$datafile_header 查看,scn 都被下面的错误信息的大。

RMAN-06025: no backup of log thread 1 seq 326 scn 58749837 found to restore  

在基于scn的恢复的时候始终抱上面的错误。不知道哪些情况会出现这种情况。或如何分析这种错误?
2#
发表于 2012-3-30 20:25:33
Action Plan:
执行以下脚本 并上传结果:
  1. spool results01.txt
  2. set echo on feedback on time on timing on pagesize 100 linesize 80 numwidth 13
  3. show user
  4. alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS';
  5. select * from v$version;
  6. select to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS') as current_date from dual;
  7. column name format a30
  8. column value format a49
  9. select name, value from v$parameter where isdefault='FALSE' order by 1;
  10. column parameter format a30
  11. column value format a49
  12. select * from v$nls_parameters order by parameter;
  13. column name format a10
  14. select dbid, name,
  15.        to_char(created, 'DD-MON-YYYY HH24:MI:SS') created,
  16.        open_mode, log_mode,
  17.        to_char(checkpoint_change#, '999999999999999') as checkpoint_change#,
  18.        controlfile_type,
  19.        to_char(controlfile_change#, '999999999999999') as controlfile_change#,
  20.        to_char(controlfile_time, 'DD-MON-YYYY HH24:MI:SS') controlfile_time,
  21.        to_char(resetlogs_change#, '999999999999999') as resetlogs_change#,
  22.        to_char(resetlogs_time, 'DD-MON-YYYY HH24:MI:SS') resetlogs_time
  23. from v$database;
  24. select * from v$instance;
  25. archive log list;
  26. select * from v$thread order by thread#;
  27. select * from v$log order by first_change#;
  28. column member format a45
  29. select * from v$logfile;
  30. column name format a79
  31. select '#' || ts.name || '#' as tablespace_name, ts.ts#,
  32.        '#' || df.name || '#' as filename, df.file#, df.status, df.enabled, df.creation_change#,
  33.        to_char(df.creation_time, 'DD-MON-YYYY HH24:MI:SS') as creation_time,
  34.        to_char(df.checkpoint_change#, '999999999999999') as checkpoint_change#,
  35.        to_char(df.checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
  36.        to_char(df.offline_change#, '999999999999999') as offline_change#,
  37.        to_char(df.online_change#, '999999999999999') as online_change#,
  38.        to_char(df.online_time, 'DD-MON-YYYY HH24:MI:SS') as online_time,
  39.        to_char(df.unrecoverable_change#, '999999999999999') as online_change#,
  40.        to_char(df.unrecoverable_time, 'DD-MON-YYYY HH24:MI:SS') as online_time,
  41.        to_char(df.bytes, '9,999,999,999,990') as bytes, block_size
  42. from v$datafile df, v$tablespace ts
  43. where ts.ts# = df.ts#
  44. and ( df.status <> 'ONLINE'
  45. or    df.checkpoint_change# <> (select checkpoint_change# from v$database) );
  46. select '#' || ts.name || '#' as tablespace_name, ts.ts#,
  47.        '#' || dh.name || '#' as filename, dh.file#, dh.status, dh.error, dh.
  48. fuzzy, dh.creation_change#,
  49.        to_char(dh.creation_time, 'DD-MON-YYYY HH24:MI:SS') as creation_time,
  50.        to_char(dh.checkpoint_change#, '999999999999999') as checkpoint_change#,
  51.        to_char(dh.checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
  52.        to_char(dh.resetlogs_change#, '999999999999999') as resetlogs_change#,
  53.        to_char(dh.resetlogs_time, 'DD-MON-YYYY HH24:MI:SS') as resetlogs_time,
  54.        to_char(dh.bytes, '9,999,999,999,990') as bytes
  55. from v$datafile_header dh, v$tablespace ts
  56. where ts.ts# = dh.ts#
  57. and ( dh.status <> 'ONLINE'
  58. or    dh.checkpoint_change# <> (select checkpoint_change# from v$database) );
  59. select * from v$tempfile;
  60. select HXFIL File_num,substr(HXFNM,1,60) file_name, FHTNM tablespace_name,
  61.        FHTYP type, HXERR validity,
  62.        FHSCN SCN, FHTIM SCN_Time, FHSTA status,
  63.        FHTHR Thread, FHRBA_SEQ Sequence
  64. from X$KCVFH
  65. --where HXERR > 0
  66. order by HXERR, FHSTA, FHSCN, HXFIL;
  67. column error format a15
  68. select error, fuzzy, status, checkpoint_change#,
  69.        to_char(checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
  70.        count(*)
  71. from v$datafile_header
  72. group by error, fuzzy, status, checkpoint_change#, checkpoint_time
  73. order by checkpoint_change#, checkpoint_time;
  74. select * from V$INSTANCE_RECOVERY;
  75. select * from v$recover_file order by change#;
  76. select * from dba_tablespaces where status <> 'ONLINE';
  77. SELECT * FROM database_properties order by property_name;
  78. select *
  79. from X$KCCLH, (select min(checkpoint_change#) df_min_scn,
  80. min(checkpoint_change#) df_max_scn
  81.                from v$datafile_header
  82.                where status='ONLINE') df
  83. where LHLOS in (select first_change# from v$log)
  84. or df.df_min_scn between LHLOS and LHNXS
  85. or df.df_max_scn between LHLOS and LHNXS;
复制代码

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-15 12:32 , Processed in 0.050687 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569