最近接触到的一个系统,出现了莫名其妙的数据丢失,怀疑是应用程序的问题,可是如何定位出问题的程序位置很难,最后根据大概的数据丢失时间,结合Logminer工具找出了有问题的程序,下面记录定位程序错误的过程:
一、根据大概的时间定位需要哪些归档文件
ERPDB1@/orabak>rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Tue Apr 6 09:26:15 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CNDERPDB (DBID=2400249746)
RMAN> list backup of archivelog time between "to_date('2010-04-01 22:00:00','yyyy-mm-dd hh24:mi:ss')" and "to_date('2010-04-02 23:00','yyyy-mm-dd hh24:mi:ss')";
using target database control file instead of recovery catalog
List of Backup Sets
===================BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18012 75.15M DISK 00:00:22 02-APR-10
BP Key: 21234 Status: AVAILABLE Compressed: YES Tag: TAG20100402T130015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715265583_18079_1List of Archived Logs in backup set 18012
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 130816 12413552772 01-APR-10 12413640444 01-APR-10
1 130817 12413640444 01-APR-10 12413642594 01-APR-10
1 130818 12413642594 01-APR-10 12413649352 01-APR-10
1 130819 12413649352 01-APR-10 12413650311 01-APR-10
1 130820 12413650311 01-APR-10 12413651164 01-APR-10
1 130821 12413651164 01-APR-10 12413651934 01-APR-10
1 130822 12413651934 01-APR-10 12413658859 01-APR-10
1 130823 12413658859 01-APR-10 12413662103 01-APR-10
1 130824 12413662103 01-APR-10 12413665559 01-APR-10
1 130825 12413665559 01-APR-10 12413668607 01-APR-10
1 130826 12413668607 01-APR-10 12413671510 01-APR-10
1 130827 12413671510 01-APR-10 12413674568 01-APR-10
1 130828 12413674568 01-APR-10 12413679025 02-APR-10
1 130829 12413679025 02-APR-10 12413681948 02-APR-10
1 130830 12413681948 02-APR-10 12413682794 02-APR-10
1 130831 12413682794 02-APR-10 12413683591 02-APR-10
1 130832 12413683591 02-APR-10 12413699490 02-APR-10
1 130833 12413699490 02-APR-10 12413700261 02-APR-10
1 130834 12413700261 02-APR-10 12413703183 02-APR-10
1 130835 12413703183 02-APR-10 12413704994 02-APR-10
1 130836 12413704994 02-APR-10 12413706561 02-APR-10
1 130837 12413706561 02-APR-10 12413708150 02-APR-10
1 130838 12413708150 02-APR-10 12413719850 02-APR-10
1 130839 12413719850 02-APR-10 12413739975 02-APR-10
1 130840 12413739975 02-APR-10 12413765112 02-APR-10
1 130841 12413765112 02-APR-10 12413792162 02-APR-10
1 130842 12413792162 02-APR-10 12413822087 02-APR-10
1 130843 12413822087 02-APR-10 12413876089 02-APR-10
1 130844 12413876089 02-APR-10 12413958554 02-APR-10
1 130845 12413958554 02-APR-10 12414035599 02-APR-10
1 130846 12414035599 02-APR-10 12414123518 02-APR-10
1 130847 12414123518 02-APR-10 12414165097 02-APR-10
1 130848 12414165097 02-APR-10 12414200120 02-APR-10
1 130849 12414200120 02-APR-10 12414234183 02-APR-10
1 130850 12414234183 02-APR-10 12414266300 02-APR-10
1 130851 12414266300 02-APR-10 12414367031 02-APR-10
1 130852 12414367031 02-APR-10 12414450980 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18013 28.81M DISK 00:00:08 02-APR-10
BP Key: 21235 Status: AVAILABLE Compressed: YES Tag: TAG20100402T130015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715265609_18081_1List of Archived Logs in backup set 18013
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 130853 12414450980 02-APR-10 12414552623 02-APR-10
1 130854 12414552623 02-APR-10 12414605521 02-APR-10
1 130855 12414605521 02-APR-10 12414688546 02-APR-10
1 130856 12414688546 02-APR-10 12414768204 02-APR-10
1 130857 12414768204 02-APR-10 12414850576 02-APR-10
1 130858 12414850576 02-APR-10 12415578138 02-APR-10
1 130859 12415578138 02-APR-10 12416563016 02-APR-10
1 130860 12416563016 02-APR-10 12417650008 02-APR-10
1 130861 12417650008 02-APR-10 12418713043 02-APR-10
1 130862 12418713043 02-APR-10 12419850520 02-APR-10
1 130863 12419850520 02-APR-10 12420094921 02-APR-10
1 130864 12420094921 02-APR-10 12420151035 02-APR-10
1 130865 12420151035 02-APR-10 12420215791 02-APR-10
1 130866 12420215791 02-APR-10 12420240304 02-APR-10
1 130867 12420240304 02-APR-10 12420251373 02-APR-10
1 130868 12420251373 02-APR-10 12420258130 02-APR-10
1 130869 12420258130 02-APR-10 12420263794 02-APR-10
1 130870 12420263794 02-APR-10 12420268456 02-APR-10
1 130871 12420268456 02-APR-10 12420270403 02-APR-10
1 130872 12420270403 02-APR-10 12420271525 02-APR-10
1 130873 12420271525 02-APR-10 12420272893 02-APR-10
1 130874 12420272893 02-APR-10 12420274107 02-APR-10
1 130875 12420274107 02-APR-10 12420275039 02-APR-10
1 130876 12420275039 02-APR-10 12420275961 02-APR-10
1 130877 12420275961 02-APR-10 12420283221 02-APR-10
1 130878 12420283221 02-APR-10 12420289525 02-APR-10
1 130879 12420289525 02-APR-10 12420308743 02-APR-10
1 130880 12420308743 02-APR-10 12420353689 02-APR-10
1 130881 12420353689 02-APR-10 12420422037 02-APR-10
1 130882 12420422037 02-APR-10 12420538802 02-APR-10
1 130883 12420538802 02-APR-10 12420674578 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18014 1.35G DISK 00:05:34 02-APR-10
BP Key: 21236 Status: AVAILABLE Compressed: YES Tag: TAG20100402T130015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715266018_18080_1List of Archived Logs in backup set 18014
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
2 139146 12413544512 01-APR-10 12413551394 01-APR-10
2 139147 12413551394 01-APR-10 12413640367 01-APR-10
2 139148 12413640367 01-APR-10 12413642584 01-APR-10
2 139149 12413642584 01-APR-10 12413649329 01-APR-10
2 139150 12413649329 01-APR-10 12413650295 01-APR-10
2 139151 12413650295 01-APR-10 12413651154 01-APR-10
2 139152 12413651154 01-APR-10 12413651918 01-APR-10
2 139153 12413651918 01-APR-10 12413658803 01-APR-10
2 139154 12413658803 01-APR-10 12413662056 01-APR-10
2 139155 12413662056 01-APR-10 12413665502 01-APR-10
2 139156 12413665502 01-APR-10 12413668540 01-APR-10
2 139157 12413668540 01-APR-10 12413671451 01-APR-10
2 139158 12413671451 01-APR-10 12413674508 01-APR-10
2 139159 12413674508 01-APR-10 12413678971 02-APR-10
2 139160 12413678971 02-APR-10 12413681936 02-APR-10
2 139161 12413681936 02-APR-10 12413682783 02-APR-10
2 139162 12413682783 02-APR-10 12413683580 02-APR-10
2 139163 12413683580 02-APR-10 12413699494 02-APR-10
2 139164 12413699494 02-APR-10 12413700259 02-APR-10
2 139165 12413700259 02-APR-10 12413703174 02-APR-10
2 139166 12413703174 02-APR-10 12413704987 02-APR-10
2 139167 12413704987 02-APR-10 12413706566 02-APR-10
2 139168 12413706566 02-APR-10 12413708145 02-APR-10
2 139169 12413708145 02-APR-10 12413719931 02-APR-10
2 139170 12413719931 02-APR-10 12413739973 02-APR-10
2 139171 12413739973 02-APR-10 12413765108 02-APR-10
2 139172 12413765108 02-APR-10 12413792160 02-APR-10
2 139173 12413792160 02-APR-10 12413822085 02-APR-10
2 139174 12413822085 02-APR-10 12413839475 02-APR-10
2 139175 12413839475 02-APR-10 12413916931 02-APR-10
2 139176 12413916931 02-APR-10 12413996350 02-APR-10
2 139177 12413996350 02-APR-10 12414058643 02-APR-10
2 139178 12414058643 02-APR-10 12414132707 02-APR-10
2 139179 12414132707 02-APR-10 12414171482 02-APR-10
2 139180 12414171482 02-APR-10 12414204122 02-APR-10
2 139181 12414204122 02-APR-10 12414237819 02-APR-10
2 139182 12414237819 02-APR-10 12414268323 02-APR-10
2 139183 12414268323 02-APR-10 12414338270 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18015 1.08G DISK 00:04:48 02-APR-10
BP Key: 21237 Status: AVAILABLE Compressed: YES Tag: TAG20100402T130015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715266355_18082_1List of Archived Logs in backup set 18015
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
2 139193 12415576435 02-APR-10 12415918972 02-APR-10
2 139194 12415918972 02-APR-10 12416263996 02-APR-10
2 139195 12416263996 02-APR-10 12416562635 02-APR-10
2 139196 12416562635 02-APR-10 12416910144 02-APR-10
2 139197 12416910144 02-APR-10 12417269808 02-APR-10
2 139198 12417269808 02-APR-10 12417649399 02-APR-10
2 139199 12417649399 02-APR-10 12417949379 02-APR-10
2 139200 12417949379 02-APR-10 12418319357 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18016 1.18G DISK 00:05:01 02-APR-10
BP Key: 21238 Status: AVAILABLE Compressed: YES Tag: TAG20100402T130015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715266651_18083_1List of Archived Logs in backup set 18016
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
2 139184 12414338270 02-APR-10 12414423130 02-APR-10
2 139185 12414423130 02-APR-10 12414500563 02-APR-10
2 139186 12414500563 02-APR-10 12414570455 02-APR-10
2 139187 12414570455 02-APR-10 12414642681 02-APR-10
2 139188 12414642681 02-APR-10 12414698647 02-APR-10
2 139189 12414698647 02-APR-10 12414771473 02-APR-10
2 139190 12414771473 02-APR-10 12414850611 02-APR-10
2 139191 12414850611 02-APR-10 12415217365 02-APR-10
2 139192 12415217365 02-APR-10 12415576435 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18017 888.53M DISK 00:03:52 02-APR-10
BP Key: 21239 Status: AVAILABLE Compressed: YES Tag: TAG20100402T130015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715266957_18084_1List of Archived Logs in backup set 18017
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
2 139201 12418319357 02-APR-10 12418704868 02-APR-10
2 139202 12418704868 02-APR-10 12419088247 02-APR-10
2 139203 12419088247 02-APR-10 12419463210 02-APR-10
2 139204 12419463210 02-APR-10 12419844874 02-APR-10
2 139205 12419844874 02-APR-10 12420094882 02-APR-10
2 139206 12420094882 02-APR-10 12420150868 02-APR-10
2 139207 12420150868 02-APR-10 12420214323 02-APR-10
2 139208 12420214323 02-APR-10 12420238252 02-APR-10
2 139209 12420238252 02-APR-10 12420250587 02-APR-10
2 139210 12420250587 02-APR-10 12420257180 02-APR-10
2 139211 12420257180 02-APR-10 12420263066 02-APR-10
2 139212 12420263066 02-APR-10 12420268384 02-APR-10
2 139213 12420268384 02-APR-10 12420270333 02-APR-10
2 139214 12420270333 02-APR-10 12420271382 02-APR-10
2 139215 12420271382 02-APR-10 12420272765 02-APR-10
2 139216 12420272765 02-APR-10 12420273996 02-APR-10
2 139217 12420273996 02-APR-10 12420274953 02-APR-10
2 139218 12420274953 02-APR-10 12420275837 02-APR-10
2 139219 12420275837 02-APR-10 12420283017 02-APR-10
2 139220 12420283017 02-APR-10 12420289397 02-APR-10
2 139221 12420289397 02-APR-10 12420308029 02-APR-10
2 139222 12420308029 02-APR-10 12420352897 02-APR-10
2 139223 12420352897 02-APR-10 12420409200 02-APR-10
2 139224 12420409200 02-APR-10 12420536370 02-APR-10
2 139225 12420536370 02-APR-10 12420673365 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18019 368.43M DISK 00:01:33 02-APR-10
BP Key: 21241 Status: AVAILABLE Compressed: YES Tag: TAG20100402T213015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715296617_18087_1List of Archived Logs in backup set 18019
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
2 139226 12420673365 02-APR-10 12420743967 02-APR-10
2 139227 12420743967 02-APR-10 12420869457 02-APR-10
2 139228 12420869457 02-APR-10 12421033197 02-APR-10
2 139229 12421033197 02-APR-10 12421227660 02-APR-10
2 139230 12421227660 02-APR-10 12421333583 02-APR-10
2 139231 12421333583 02-APR-10 12421496532 02-APR-10
2 139232 12421496532 02-APR-10 12421613786 02-APR-10
2 139233 12421613786 02-APR-10 12421745380 02-APR-10
2 139234 12421745380 02-APR-10 12421894114 02-APR-10
2 139235 12421894114 02-APR-10 12421998582 02-APR-10
2 139236 12421998582 02-APR-10 12422163198 02-APR-10
2 139237 12422163198 02-APR-10 12422276738 02-APR-10
2 139238 12422276738 02-APR-10 12422408879 02-APR-10
2 139239 12422408879 02-APR-10 12422531754 02-APR-10
2 139240 12422531754 02-APR-10 12422630287 02-APR-10
2 139241 12422630287 02-APR-10 12422733683 02-APR-10
2 139242 12422733683 02-APR-10 12422830935 02-APR-10
2 139243 12422830935 02-APR-10 12422841318 02-APR-10
2 139244 12422841318 02-APR-10 12422845794 02-APR-10
2 139245 12422845794 02-APR-10 12422848359 02-APR-10
2 139246 12422848359 02-APR-10 12422852191 02-APR-10
2 139247 12422852191 02-APR-10 12422855696 02-APR-10
2 139248 12422855696 02-APR-10 12422860249 02-APR-10
2 139249 12422860249 02-APR-10 12422861531 02-APR-10
2 139250 12422861531 02-APR-10 12422868202 02-APR-10
2 139251 12422868202 02-APR-10 12422875058 02-APR-10
2 139252 12422875058 02-APR-10 12422892330 02-APR-10
2 139253 12422892330 02-APR-10 12422906852 02-APR-10
2 139254 12422906852 02-APR-10 12422922052 02-APR-10
2 139255 12422922052 02-APR-10 12423017940 02-APR-10
2 139256 12423017940 02-APR-10 12423167539 02-APR-10
2 139257 12423167539 02-APR-10 12423419386 02-APR-10
2 139258 12423419386 02-APR-10 12423572891 02-APR-10
2 139259 12423572891 02-APR-10 12423679063 02-APR-10
2 139260 12423679063 02-APR-10 12423804204 02-APR-10
2 139261 12423804204 02-APR-10 12423965935 02-APR-10
2 139262 12423965935 02-APR-10 12424067553 02-APR-10
2 139263 12424067553 02-APR-10 12424181177 02-APR-10
2 139264 12424181177 02-APR-10 12424276388 02-APR-10
2 139265 12424276388 02-APR-10 12424460831 02-APR-10
2 139266 12424460831 02-APR-10 12424607422 02-APR-10
2 139267 12424607422 02-APR-10 12424743466 02-APR-10
2 139268 12424743466 02-APR-10 12424914672 02-APR-10
2 139269 12424914672 02-APR-10 12425085812 02-APR-10
2 139270 12425085812 02-APR-10 12425218972 02-APR-10
2 139271 12425218972 02-APR-10 12425344844 02-APR-10
2 139272 12425344844 02-APR-10 12425480047 02-APR-10
2 139273 12425480047 02-APR-10 12425643050 02-APR-10
2 139274 12425643050 02-APR-10 12425758729 02-APR-10
2 139275 12425758729 02-APR-10 12425909760 02-APR-10
2 139276 12425909760 02-APR-10 12426102834 02-APR-10
2 139277 12426102834 02-APR-10 12426236664 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18020 421.06M DISK 00:01:44 02-APR-10
BP Key: 21242 Status: AVAILABLE Compressed: YES Tag: TAG20100402T213015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715296183_18086_1List of Archived Logs in backup set 18020
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 130884 12420674578 02-APR-10 12420751514 02-APR-10
1 130885 12420751514 02-APR-10 12420869668 02-APR-10
1 130886 12420869668 02-APR-10 12421033097 02-APR-10
1 130887 12421033097 02-APR-10 12421227343 02-APR-10
1 130888 12421227343 02-APR-10 12421332908 02-APR-10
1 130889 12421332908 02-APR-10 12421485220 02-APR-10
1 130890 12421485220 02-APR-10 12421612693 02-APR-10
1 130891 12421612693 02-APR-10 12421729960 02-APR-10
1 130892 12421729960 02-APR-10 12421883068 02-APR-10
1 130893 12421883068 02-APR-10 12421996639 02-APR-10
1 130894 12421996639 02-APR-10 12422142061 02-APR-10
1 130895 12422142061 02-APR-10 12422259990 02-APR-10
1 130896 12422259990 02-APR-10 12422380732 02-APR-10
1 130897 12422380732 02-APR-10 12422512955 02-APR-10
1 130898 12422512955 02-APR-10 12422622031 02-APR-10
1 130899 12422622031 02-APR-10 12422731142 02-APR-10
1 130900 12422731142 02-APR-10 12422829112 02-APR-10
1 130901 12422829112 02-APR-10 12422840605 02-APR-10
1 130902 12422840605 02-APR-10 12422845469 02-APR-10
1 130903 12422845469 02-APR-10 12422847714 02-APR-10
1 130904 12422847714 02-APR-10 12422851559 02-APR-10
1 130905 12422851559 02-APR-10 12422854834 02-APR-10
1 130906 12422854834 02-APR-10 12422859713 02-APR-10
1 130907 12422859713 02-APR-10 12422861547 02-APR-10
1 130908 12422861547 02-APR-10 12422868247 02-APR-10
1 130909 12422868247 02-APR-10 12422875082 02-APR-10
1 130910 12422875082 02-APR-10 12422892562 02-APR-10
1 130911 12422892562 02-APR-10 12422906910 02-APR-10
1 130912 12422906910 02-APR-10 12422922078 02-APR-10
1 130913 12422922078 02-APR-10 12423017956 02-APR-10
1 130914 12423017956 02-APR-10 12423167377 02-APR-10
1 130915 12423167377 02-APR-10 12423419566 02-APR-10
1 130916 12423419566 02-APR-10 12423572829 02-APR-10
1 130917 12423572829 02-APR-10 12423677866 02-APR-10
1 130918 12423677866 02-APR-10 12423798772 02-APR-10
1 130919 12423798772 02-APR-10 12423964636 02-APR-10
1 130920 12423964636 02-APR-10 12424056421 02-APR-10
1 130921 12424056421 02-APR-10 12424169818 02-APR-10
1 130922 12424169818 02-APR-10 12424259646 02-APR-10
1 130923 12424259646 02-APR-10 12424456980 02-APR-10
1 130924 12424456980 02-APR-10 12424577229 02-APR-10
1 130925 12424577229 02-APR-10 12424729139 02-APR-10
1 130926 12424729139 02-APR-10 12424892515 02-APR-10
1 130927 12424892515 02-APR-10 12425058920 02-APR-10
1 130928 12425058920 02-APR-10 12425183453 02-APR-10
1 130929 12425183453 02-APR-10 12425302024 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18021 104.97M DISK 00:00:25 02-APR-10
BP Key: 21243 Status: AVAILABLE Compressed: YES Tag: TAG20100402T213015
Piece Name: /orabak/arch/CNDERPDB_arch_20100402_715296294_18088_1List of Archived Logs in backup set 18021
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 130930 12425302024 02-APR-10 12425464067 02-APR-10
1 130931 12425464067 02-APR-10 12425612482 02-APR-10
1 130932 12425612482 02-APR-10 12425741312 02-APR-10
1 130933 12425741312 02-APR-10 12425903002 02-APR-10
1 130934 12425903002 02-APR-10 12426033120 02-APR-10
1 130935 12426033120 02-APR-10 12426231614 02-APR-10
1 130936 12426231614 02-APR-10 12426258334 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18034 66.82M DISK 00:00:20 03-APR-10
BP Key: 21292 Status: AVAILABLE Compressed: YES Tag: TAG20100403T130014
Piece Name: /orabak/arch/CNDERPDB_arch_20100403_715351984_18101_1List of Archived Logs in backup set 18034
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 130937 12426258334 02-APR-10 12426281568 02-APR-10
1 130938 12426281568 02-APR-10 12426378051 02-APR-10
1 130939 12426378051 02-APR-10 12426497713 02-APR-10
1 130940 12426497713 02-APR-10 12426508246 02-APR-10
1 130941 12426508246 02-APR-10 12426518759 02-APR-10
1 130942 12426518759 02-APR-10 12426561156 02-APR-10
1 130943 12426561156 02-APR-10 12426575448 02-APR-10
1 130944 12426575448 02-APR-10 12426581961 02-APR-10
1 130945 12426581961 02-APR-10 12426604391 02-APR-10
1 130946 12426604391 02-APR-10 12426607860 02-APR-10
1 130947 12426607860 02-APR-10 12426611851 02-APR-10
1 130948 12426611851 02-APR-10 12426614176 02-APR-10
1 130949 12426614176 02-APR-10 12426625355 02-APR-10
1 130950 12426625355 02-APR-10 12426629997 02-APR-10
1 130951 12426629997 02-APR-10 12426632292 02-APR-10
1 130952 12426632292 02-APR-10 12426638597 02-APR-10
1 130953 12426638597 02-APR-10 12426645006 02-APR-10
1 130954 12426645006 02-APR-10 12426646673 02-APR-10
1 130955 12426646673 02-APR-10 12426648522 02-APR-10
1 130956 12426648522 02-APR-10 12426652032 02-APR-10
1 130957 12426652032 02-APR-10 12426667628 02-APR-10
1 130958 12426667628 02-APR-10 12426669877 02-APR-10
1 130959 12426669877 02-APR-10 12426670663 02-APR-10
1 130960 12426670663 02-APR-10 12426671857 02-APR-10
1 130961 12426671857 02-APR-10 12426673180 02-APR-10
1 130962 12426673180 02-APR-10 12426674259 02-APR-10
1 130963 12426674259 02-APR-10 12426719108 02-APR-10
1 130964 12426719108 02-APR-10 12426751352 02-APR-10
1 130965 12426751352 02-APR-10 12426752399 02-APR-10
1 130966 12426752399 02-APR-10 12426753211 02-APR-10
1 130967 12426753211 02-APR-10 12426754028 02-APR-10
1 130968 12426754028 02-APR-10 12426754879 02-APR-10
1 130969 12426754879 02-APR-10 12426761703 02-APR-10BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
18038 1.32G DISK 00:05:25 03-APR-10
BP Key: 21296 Status: AVAILABLE Compressed: YES Tag: TAG20100403T130014
Piece Name: /orabak/arch/CNDERPDB_arch_20100403_715353019_18105_1List of Archived Logs in backup set 18038
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
2 139278 12426236664 02-APR-10 12426270726 02-APR-10
2 139279 12426270726 02-APR-10 12426285750 02-APR-10
2 139280 12426285750 02-APR-10 12426409113 02-APR-10
2 139281 12426409113 02-APR-10 12426501941 02-APR-10
2 139282 12426501941 02-APR-10 12426510767 02-APR-10
2 139283 12426510767 02-APR-10 12426521032 02-APR-10
2 139284 12426521032 02-APR-10 12426563858 02-APR-10
2 139285 12426563858 02-APR-10 12426576699 02-APR-10
2 139286 12426576699 02-APR-10 12426584470 02-APR-10
2 139287 12426584470 02-APR-10 12426605256 02-APR-10
2 139288 12426605256 02-APR-10 12426608982 02-APR-10
2 139289 12426608982 02-APR-10 12426612473 02-APR-10
2 139290 12426612473 02-APR-10 12426624363 02-APR-10
2 139291 12426624363 02-APR-10 12426625804 02-APR-10
2 139292 12426625804 02-APR-10 12426630539 02-APR-10
2 139293 12426630539 02-APR-10 12426632904 02-APR-10
2 139294 12426632904 02-APR-10 12426639011 02-APR-10
2 139295 12426639011 02-APR-10 12426645620 02-APR-10
2 139296 12426645620 02-APR-10 12426647268 02-APR-10
2 139297 12426647268 02-APR-10 12426649060 02-APR-10
2 139298 12426649060 02-APR-10 12426653216 02-APR-10
2 139299 12426653216 02-APR-10 12426668724 02-APR-10
2 139300 12426668724 02-APR-10 12426670578 02-APR-10
2 139301 12426670578 02-APR-10 12426670660 02-APR-10
2 139302 12426670660 02-APR-10 12426671859 02-APR-10
2 139303 12426671859 02-APR-10 12426673157 02-APR-10
2 139304 12426673157 02-APR-10 12426674262 02-APR-10
2 139305 12426674262 02-APR-10 12426719104 02-APR-10
2 139306 12426719104 02-APR-10 12426751344 02-APR-10
2 139307 12426751344 02-APR-10 12426752392 02-APR-10
2 139308 12426752392 02-APR-10 12426753203 02-APR-10
2 139309 12426753203 02-APR-10 12426754019 02-APR-10
2 139310 12426754019 02-APR-10 12426754870 02-APR-10
2 139311 12426754870 02-APR-10 12426761660 02-APR-10RMAN>
RMAN> exit
Recovery Manager complete.
二、拷贝需要的rman备份片文件回来,放到默认的rman备份路径
ERPDB1@/orabak/arch>ls -l
total 14338968
-rw-r----- 1 oracle oinstall 78802432 Apr 06 09:35 CNDERPDB_arch_20100402_715265583_18079_1
-rw-r----- 1 oracle oinstall 30210560 Apr 06 09:36 CNDERPDB_arch_20100402_715265609_18081_1
-rw-r----- 1 oracle oinstall 1447344128 Apr 06 09:52 CNDERPDB_arch_20100402_715266018_18080_1
-rw-r----- 1 oracle oinstall 1154966528 Apr 06 09:51 CNDERPDB_arch_20100402_715266355_18082_1
-rw-r----- 1 oracle oinstall 1264911360 Apr 06 09:51 CNDERPDB_arch_20100402_715266651_18083_1
-rw-r----- 1 oracle oinstall 931689984 Apr 06 09:50 CNDERPDB_arch_20100402_715266957_18084_1
-rw-r----- 1 oracle oinstall 441509888 Apr 06 09:41 CNDERPDB_arch_20100402_715296183_18086_1
-rw-r----- 1 oracle oinstall 110066176 Apr 06 09:42 CNDERPDB_arch_20100402_715296294_18088_1
-rw-r----- 1 oracle oinstall 386329600 Apr 06 09:53 CNDERPDB_arch_20100402_715296617_18087_1
-rw-r----- 1 oracle oinstall 70063104 Apr 06 09:36 CNDERPDB_arch_20100403_715351984_18101_1
-rw-r----- 1 oracle oinstall 1420035584 Apr 06 09:55 CNDERPDB_arch_20100403_715353019_18105_1
三、从Rman备份片中解析出归档日志文件
ERPDB1@/orabak/arch>rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Tue Apr 6 10:01:54 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CNDERPDB (DBID=2400249746)
RMAN> run {
2> set archivelog destination to '/orabak/testarch';
3> SQL 'ALTER SESSION SET NLS_DATE_FORMAT="YYYY-MM-DD:HH24:MI:SS"';
restore archivelog time between '2010-04-01 22:00:00' and '2010-04-02 23:00:00';4>
5> }executing command: SET ARCHIVELOG DESTINATION
using target database control file instead of recovery catalogsql statement: ALTER SESSION SET NLS_DATE_FORMAT="YYYY-MM-DD:HH24:MI:SS"
Starting restore at 06-APR-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=676 instance=cnderpdb1 devtype=DISKchannel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130816
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130817
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130818
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130819
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130820
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130821
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130822
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130823
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130824
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130825
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130826
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130827
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130828
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130829
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130830
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130831
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130832
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130833
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130834
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130835
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130836
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130837
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130838
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130839
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130840
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130841
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130842
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130843
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130844
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130845
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130846
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130847
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130848
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130849
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130850
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130851
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130852
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715265583_18079_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715265583_18079_1 tag=TAG20100402T130015
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130853
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130854
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130855
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130856
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130857
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130858
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130859
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130860
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130861
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130862
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130863
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130864
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130865
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130866
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130867
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130868
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130869
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130870
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130871
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130872
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130873
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130874
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130875
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130876
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130877
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130878
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130879
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130880
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130881
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130882
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130883
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715265609_18081_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715265609_18081_1 tag=TAG20100402T130015
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139146
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139147
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139148
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139149
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139150
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139151
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139152
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139153
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139154
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139155
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139156
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139157
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139158
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139159
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139160
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139161
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139162
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139163
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139164
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139165
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139166
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139167
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139168
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139169
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139170
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139171
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139172
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139173
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139174
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139175
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139176
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139177
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139178
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139179
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139180
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139181
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139182
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139183
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715266018_18080_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715266018_18080_1 tag=TAG20100402T130015
channel ORA_DISK_1: restore complete, elapsed time: 00:08:55
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139193
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139194
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139195
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139196
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139197
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139198
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139199
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139200
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715266355_18082_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715266355_18082_1 tag=TAG20100402T130015
channel ORA_DISK_1: restore complete, elapsed time: 00:08:35
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139184
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139185
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139186
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139187
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139188
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139189
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139190
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139191
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139192
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715266651_18083_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715266651_18083_1 tag=TAG20100402T130015
channel ORA_DISK_1: restore complete, elapsed time: 00:08:35
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139201
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139202
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139203
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139204
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139205
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139206
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139207
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139208
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139209
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139210
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139211
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139212
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139213
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139214
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139215
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139216
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139217
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139218
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139219
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139220
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139221
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139222
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139223
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139224
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139225
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715266957_18084_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715266957_18084_1 tag=TAG20100402T130015
channel ORA_DISK_1: restore complete, elapsed time: 00:06:40
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130884
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130885
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130886
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130887
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130888
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130889
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130890
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130891
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130892
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130893
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130894
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130895
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130896
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130897
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130898
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130899
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130900
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130901
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130902
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130903
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130904
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130905
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130906
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130907
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130908
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130909
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130910
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130911
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130912
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130913
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130914
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130915
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130916
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130917
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130918
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130919
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130920
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130921
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130922
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130923
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130924
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130925
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130926
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130927
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130928
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130929
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715296183_18086_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715296183_18086_1 tag=TAG20100402T213015
channel ORA_DISK_1: restore complete, elapsed time: 00:02:45
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130930
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130931
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130932
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130933
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130934
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130935
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130936
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715296294_18088_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715296294_18088_1 tag=TAG20100402T213015
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139226
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139227
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139228
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139229
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139230
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139231
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139232
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139233
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139234
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139235
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139236
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139237
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139238
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139239
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139240
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139241
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139242
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139243
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139244
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139245
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139246
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139247
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139248
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139249
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139250
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139251
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139252
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139253
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139254
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139255
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139256
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139257
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139258
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139259
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139260
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139261
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139262
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139263
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139264
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139265
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139266
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139267
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139268
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139269
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139270
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139271
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139272
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139273
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139274
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139275
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139276
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139277
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100402_715296617_18087_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100402_715296617_18087_1 tag=TAG20100402T213015
channel ORA_DISK_1: restore complete, elapsed time: 00:02:16
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130937
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130938
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130939
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130940
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130941
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130942
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130943
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130944
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130945
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130946
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130947
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130948
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130949
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130950
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130951
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130952
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130953
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130954
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130955
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130956
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130957
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130958
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130959
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130960
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130961
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130962
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130963
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130964
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130965
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130966
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130967
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130968
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=130969
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100403_715351984_18101_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100403_715351984_18101_1 tag=TAG20100403T130014
channel ORA_DISK_1: restore complete, elapsed time: 00:00:38
channel ORA_DISK_1: starting archive log restore to user-specified destination
archive log destination=/orabak/testarch
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139278
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139279
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139280
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139281
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139282
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139283
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139284
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139285
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139286
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139287
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139288
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139289
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139290
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139291
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139292
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139293
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139294
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139295
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139296
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139297
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139298
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139299
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139300
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139301
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139302
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139303
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139304
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139305
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139306
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139307
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139308
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139309
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139310
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=139311
channel ORA_DISK_1: reading from backup piece /orabak/arch/CNDERPDB_arch_20100403_715353019_18105_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/orabak/arch/CNDERPDB_arch_20100403_715353019_18105_1 tag=TAG20100403T130014
channel ORA_DISK_1: restore complete, elapsed time: 00:06:56
Finished restore at 06-APR-10RMAN>
RMAN> exit
Recovery Manager complete.
四、把归档日志文件转移到测试环境以便进行日志挖掘
p5b2@/orabak/testarch$ rcp p5a1:/orabak/testarch/* /orabak/testarch/
p5b2@/orabak/testarch$ ls -l
total 36555528
-rw-r----- 1 oracle oinstall 10272768 Apr 06 11:50 1_130816_640266118.dbf
-rw-r----- 1 oracle oinstall 756224 Apr 06 11:50 1_130817_640266118.dbf
-rw-r----- 1 oracle oinstall 308736 Apr 06 11:50 1_130818_640266118.dbf
-rw-r----- 1 oracle oinstall 160256 Apr 06 11:50 1_130819_640266118.dbf
-rw-r----- 1 oracle oinstall 113664 Apr 06 11:50 1_130820_640266118.dbf
-rw-r----- 1 oracle oinstall 59904 Apr 06 11:50 1_130821_640266118.dbf
......
-rw-r----- 1 oracle oinstall 10095104 Apr 06 12:20 2_139311_640266118.dbf
五、在测试环境上开始用Logminer工具进行挖掘:
p5b2@/orabak/testarch$ sqlplus " / as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Apr 6 14:01:09 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining options
SQL> EXECUTE DBMS_LOGMNR_D.SET_TABLESPACE('erp');
PL/SQL procedure successfully completed.
SQL> EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LogFileName=>'/orabak/testarch/1_130816_640266118.dbf',Options=>dbms_logmnr.new);
PL/SQL procedure successfully completed.
SQL> EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LogFileName=>'/orabak/testarch/1_130817_640266118.dbf',Options=>dbms_logmnr.addfile);
......
EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LogFileName=>'/orabak/testarch/1_130821_640266118.dbf',Options=>dbms_logmnr.addfile);SQL>
PL/SQL procedure successfully completed.SQL>
PL/SQL procedure successfully completed.
SQL>
SQL> EXEC DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);PL/SQL procedure successfully completed.
SQL> create table erp.log_201004_1 as select * from v$logmnr_contents;
Table created.
SQL> exec dbms_logmnr.end_logmnr;
PL/SQL procedure successfully completed.
SQL>
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
查询结果集,根据表名和DML操作类型定位SQL语句:
SQL> select count(*)
2 from v$logmnr_contents where seg_owner='ERP'
3 and seg_name='FA_CARD' and operation='DELETE'
4 /COUNT(*)
----------
29SQL> select timestamp,username,session#,sql_redo,operation,session_info
2 from log_201004_1 where seg_owner='ERP'
3 and seg_name='FA_CARD' and operation='DELETE'
4 /
根据SQL语句的内容和系统日志,最终确定了具体的案发时间、地点和人物,但是这种数据丢失已经不可挽回了,因为这个数据丢失并不是简单的删除一个表的记录,而是程序代码的问题导致每当用户做一个操作的时侯,就会删除掉一点数据,可能从系统上线的时侯开始,数据就已经不准确了。应用程序的错误导致的数据损失,这是多么可怕的事情。