用bbed修改資料檔案頭,跳過丟失的歸檔
conn lunar/lunar
create table t1 tablespace rogertbs as select * from dba_objects;create table t2 tablespace rogertbs as select * from dba_objects;
create table t3 tablespace rogertbs as select * from dba_objects;
archive log list
SQL> conn lunar/lunar
Connected.
SQL> create table t1 tablespace rogertbs as select * from dba_objects;
Table created.
SQL> create table t2 tablespace rogertbs as select * from dba_objects;
Table created.
SQL> create table t3 tablespace rogertbs as select * from dba_objects;
Table created.
SQL> conn / as sysdba
Connected.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 18
Next log sequence to archive 20
Current log sequence 20
SQL> alter system switch logfile;
System altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 19
Next log sequence to archive 21
Current log sequence 21
SQL> alter system switch logfile;
/
System altered.
SQL>
System altered.
SQL>
SQL>
conn lunar/lunar
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
SQL> conn lunar/lunar
Connected.
SQL> select count(*) from t1;
COUNT(*)
----------
17619
SQL> select count(*) from t2;
COUNT(*)
----------
17620
SQL> select count(*) from t3;
COUNT(*)
----------
17621
SQL>
conn lunar/lunar
delete from t2 where rownum <2;
delete from t3 where rownum <2;
commit;
conn / as sysdba
alter system switch logfile;
archive log list
SQL> conn lunar/lunar
delete from t2 where rownum <2;
delete from t3 where rownum <2;
Connected.
SQL> commit;
1 row deleted.
SQL>
1 row deleted.
SQL>
Commit complete.
SQL>
SQL> conn / as sysdba
alter system switch logfile;
Connected.
SQL> archive log list
System altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 22
Next log sequence to archive 23
Current log sequence 24
SQL>
SQL>
conn lunar/lunar
delete from t1 where rownum <10001;
commit;
conn / as sysdba
alter system switch logfile;
alter system switch logfile;
alter system switch logfile;
archive log list
SQL> conn / as sysdba
alter system switch logfile;
Connected.
SQL> alter system switch logfile;
alter system switch logfile;
archive log list
System altered.
SQL>
System altered.
SQL>
System altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 25
Next log sequence to archive 26
Current log sequence 27
SQL> SQL>
SQL>
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !
cp /test/clonedb/roger01.dbf /test/clonedb/roger01.dbf.bak
[
-rw-r----- 1 oracle oinstall 10493952 Aug 16 03:07 /test/clonedb/roger01.dbf
-rw-r----- 1 oracle oinstall 10493952 Aug 16 03:09 /test/clonedb/roger01.dbf.bak
[[email protected] clonedb]$
conn / as sysdba
startup
conn lunar/lunar
delete from t1 where rownum <10001;
delete from t2 where rownum <2;
delete from t3 where rownum <2;
commit;
conn / as sysdba
alter system switch logfile;
archive log list
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 530288640 bytes
Fixed Size 2230024 bytes
Variable Size 167774456 bytes
Database Buffers 352321536 bytes
Redo Buffers 7962624 bytes
Database mounted.
Database opened.
SQL> conn lunar/lunar
delete from t1 where rownum <10001;
delete from t2 where rownum <2;
delete from t3 where rownum <2;
commit;
Connected.
SQL>
7619 rows deleted.
SQL>
1 row deleted.
SQL>
1 row deleted.
SQL>
Commit complete.
SQL>
SQL> conn / as sysdba
alter system switch logfile;
archive log list
Connected.
SQL>
System altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 26
Next log sequence to archive 27
Current log sequence 28
SQL>
alter system switch logfile;
alter system switch logfile;
archive log list;
SQL> alter system switch logfile;
alter system switch logfile;
archive log list;
System altered.
SQL>
System altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 28
Next log sequence to archive 29
Current log sequence 30
SQL> SQL>
SQL>
[
[[email protected] archive]$ rm 1_26_805
1_26_805707062.dbf 1_26_805858745.dbf
[[email protected] archive]$ rm 1_26_805*
[[email protected] archive]$
[[email protected] clonedb]$ rm roger01.dbf
[[email protected]
-rw-r----- 1 oracle oinstall 10493952 Aug 16 03:09 roger01.dbf.bak
[[email protected] clonedb]$
SQL> conn / as sysdba
Connected.
SQL> shutdown immediate
ORA-01116: error in opening database file 5
ORA-01110: data file 5: '/test/clonedb/roger01.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[[email protected] ~]$
[[email protected] ~]$
[[email protected] ~]$ ss
SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 16 03:32:52 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 530288640 bytes
Fixed Size 2230024 bytes
Variable Size 167774456 bytes
Database Buffers 352321536 bytes
Redo Buffers 7962624 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/test/clonedb/roger01.dbf'
SQL>
SQL> recover datafile 5;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 5: '/test/clonedb/roger01.dbf'
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/test/clonedb/roger01.dbf'
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 30
Next log sequence to archive 32
Current log sequence 32
SQL> select open_mode from v$database;
OPEN_MODE
----------------------------------------
MOUNTED
SQL>
set linesize112
set pages 999
col LHNAM for a35
col LHRLS for a15
select LHSEQ,LHNAM,LHRLS,LHRLC from x$kcclh;
SQL> set linesize112
SQL> set pages 999
SQL> col LHNAM for a35
SQL> col LHRLS for a15
SQL> select LHSEQ,LHNAM,LHRLS,LHRLC from x$kcclh;
LHSEQ LHNAM LHRLS LHRLC
---------- ----------------------------------- --------------- ----------------------------------------
1 /u01/archive/1_1_805858745.dbf 330515 01/28/2013 01:39:05
2 /u01/archive/1_2_805858745.dbf 330515 01/28/2013 01:39:05
3 /u01/archive/1_3_805858745.dbf 330515 01/28/2013 01:39:05
4 /u01/archive/1_4_805858745.dbf 330515 01/28/2013 01:39:05
5 /u01/archive/1_5_805858745.dbf 330515 01/28/2013 01:39:05
6 /u01/archive/1_6_805858745.dbf 330515 01/28/2013 01:39:05
7 /u01/archive/1_7_805858745.dbf 330515 01/28/2013 01:39:05
8 /u01/archive/1_8_805858745.dbf 330515 01/28/2013 01:39:05
9 /u01/archive/1_9_805858745.dbf 330515 01/28/2013 01:39:05
10 /u01/archive/1_10_805858745.dbf 330515 01/28/2013 01:39:05
11 /u01/archive/1_11_805858745.dbf 330515 01/28/2013 01:39:05
12 /u01/archive/1_12_805858745.dbf 330515 01/28/2013 01:39:05
13 /u01/archive/1_13_805858745.dbf 330515 01/28/2013 01:39:05
14 /u01/archive/1_14_805858745.dbf 330515 01/28/2013 01:39:05
15 /u01/archive/1_15_805858745.dbf 330515 01/28/2013 01:39:05
16 /u01/archive/1_16_805858745.dbf 330515 01/28/2013 01:39:05
17 /u01/archive/1_17_805858745.dbf 330515 01/28/2013 01:39:05
18 /u01/archive/1_18_805858745.dbf 330515 01/28/2013 01:39:05
19 /u01/archive/1_19_805858745.dbf 330515 01/28/2013 01:39:05
20 /u01/archive/1_20_805858745.dbf 330515 01/28/2013 01:39:05
21 /u01/archive/1_21_805858745.dbf 330515 01/28/2013 01:39:05
22 /u01/archive/1_22_805858745.dbf 330515 01/28/2013 01:39:05
23 /u01/archive/1_23_805858745.dbf 330515 01/28/2013 01:39:05
24 /u01/archive/1_24_805858745.dbf 330515 01/28/2013 01:39:05
25 /u01/archive/1_25_805858745.dbf 330515 01/28/2013 01:39:05
26 /u01/archive/1_26_805858745.dbf 330515 01/28/2013 01:39:05
27 /u01/archive/1_27_805858745.dbf 330515 01/28/2013 01:39:05
28 /u01/archive/1_28_805858745.dbf 330515 01/28/2013 01:39:05
29 /u01/archive/1_29_805858745.dbf 330515 01/28/2013 01:39:05
30 /u01/archive/1_30_805858745.dbf 330515 01/28/2013 01:39:05
31 /u01/archive/1_31_805858745.dbf 330515 01/28/2013 01:39:05
31 rows selected.
SQL>
SQL> select rtnum "thread#",decode(bitand(rtsta,128), 128, 'FB_ENABLED_FOR_THREAD','FB_DISABLED_FOR_THREAD') "FLASHBACK" from x$kccrt;
thread# FLASHBACK
---------- --------------------------------------------
1 FB_DISABLED_FOR_THREAD
SQL> col RTCKP_SCN for a15
SQL> col RTENB for a15
SQL> l
1* select RTCKP_SCN,RTCKP_RBA_SEQ,RTCKP_RBA_BNO,RTCKP_RBA_BOF,RTSEQ,RTENB from x$kccrt
SQL> /
RTCKP_SCN RTCKP_RBA_SEQ RTCKP_RBA_BNO RTCKP_RBA_BOF RTSEQ RTENB
--------------- ------------- ------------- ------------- ---------- ---------------
522089 32 2 16 32 330515
SQL>
SQL> col name for a55
SQL> select name, checkpoint_change#,to_char(checkpoint_change#,'XXXXXXXXXXXX') from v$datafile where name like '%roger%';
NAME CHECKPOINT_CHANGE# TO_CHAR(CHECKPOINT_CHANGE#
------------------------------------------------------- ------------------ --------------------------
/test/clonedb/roger01.dbf 522089 7F769
SQL> select checkpoint_change# from v$database;
CHECKPOINT_CHANGE#
------------------
522089
SQL>
SQL> select RESETLOGS_CHANGE#, PRIOR_RESETLOGS_CHANGE# ,CHECKPOINT_CHANGE# , CONTROLFILE_SEQUENCE#
2 ,CONTROLFILE_CHANGE#, MIN_REQUIRED_CAPTURE_CHANGE# from v$database;
RESETLOGS_CHANGE# PRIOR_RESETLOGS_CHANGE# CHECKPOINT_CHANGE#
----------------- ----------------------- ------------------
CONTROLFILE_SEQUENCE# CONTROLFILE_CHANGE# MIN_REQUIRED_CAPTURE_CHANGE#
--------------------- ------------------- ----------------------------
330515 1 522089
821 522089
SQL>
[[email protected] clonedb]$ cp roger01.dbf.bak roger01.dbf
[[email protected] clonedb]$
[[email protected] ~]$ ss
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 4 16:44:05 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> recover datafile 5;
ORA-00279: change 521392 generated at 08/16/2012 03:07:34 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_27_805858745.dbf
ORA-00280: change 521392 for thread 1 is in sequence #27
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 521876 generated at 08/16/2012 03:21:17 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_28_805858745.dbf
ORA-00280: change 521876 for thread 1 is in sequence #28
ORA-00279: change 521884 generated at 08/16/2012 03:21:35 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_29_805858745.dbf
ORA-00280: change 521884 for thread 1 is in sequence #29
Log applied.
Media recovery complete.
SQL>
[[email protected] ~]$ ss
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 4 16:44:05 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> recover datafile 5;
ORA-00279: change 521392 generated at 08/16/2012 03:07:34 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_27_805858745.dbf
ORA-00280: change 521392 for thread 1 is in sequence #27
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 521876 generated at 08/16/2012 03:21:17 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_28_805858745.dbf
ORA-00280: change 521876 for thread 1 is in sequence #28
ORA-00279: change 521884 generated at 08/16/2012 03:21:35 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_29_805858745.dbf
ORA-00280: change 521884 for thread 1 is in sequence #29
Log applied.
Media recovery complete.
SQL>
[[email protected] ~]$ rm /u01/archive/1_28_805858745.dbf
[[email protected] ~]$ cp /test/clonedb/roger01.dbf.bak /test/clonedb/roger01.dbf
[[email protected] ~]$
SQL> recover datafile 5;
ORA-00279: change 521392 generated at 08/16/2012 03:07:34 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_27_805858745.dbf
ORA-00280: change 521392 for thread 1 is in sequence #27
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 521876 generated at 08/16/2012 03:21:17 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_28_805858745.dbf
ORA-00280: change 521876 for thread 1 is in sequence #28
ORA-00308: cannot open archived log '/u01/archive/1_28_805858745.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL>
kscnbas/kcvcptim/kcvfhcpc/kcvfhccc
一般資料庫啟動會校驗如下4個地方來驗證資料庫一致性:
1.kscnbas 資料檔案最後一次檢查點的SCN
2.kcvcptim 資料檔案最後一次檢查點的時間
3.kcvfhcpc ,檢查點計數
4.kcvfhccc ,總是比檢查點計數小1
BBED> p kcvfhckp
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x0007f694 521876
ub2 kscnwrp @488 0x0000
ub4 kcvcptim @492 0x2f2c5b2d
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0000001c
ub4 kcrbabno @504 0x00000002
ub2 kcrbabof @508 0x0000
ub1 kcvcpetb[0] @512 0x02
ub1 kcvcpetb[1] @513 0x00
ub1 kcvcpetb[2] @514 0x00
ub1 kcvcpetb[3] @515 0x00
ub1 kcvcpetb[4] @516 0x00
ub1 kcvcpetb[5] @517 0x00
ub1 kcvcpetb[6] @518 0x00
ub1 kcvcpetb[7] @519 0x00
BBED>
BBED> p kcvfhcpc
ub4 kcvfhcpc @140 0x00000013 19 v$datafile_header.checkpoint_count
BBED> p kcvfhccc
ub4 kcvfhccc @148 0x00000012 18
BBED>
set linesize 112
set pages 999
col LHNAM for a35
col LHRLS for a15
col LHRLC for a20
select LHSEQ,LHNAM,LHRLS,LHRLC from x$kcclh;
SQL> select LHSEQ,LHNAM,LHRLS,LHRLC from x$kcclh;
LHSEQ LHNAM LHRLS LHRLC
---------- ----------------------------------- --------------- --------------------
1 /u01/archive/1_1_805858745.dbf 330515 01/28/2013 01:39:05
2 /u01/archive/1_2_805858745.dbf 330515 01/28/2013 01:39:05
3 /u01/archive/1_3_805858745.dbf 330515 01/28/2013 01:39:05
4 /u01/archive/1_4_805858745.dbf 330515 01/28/2013 01:39:05
5 /u01/archive/1_5_805858745.dbf 330515 01/28/2013 01:39:05
6 /u01/archive/1_6_805858745.dbf 330515 01/28/2013 01:39:05
7 /u01/archive/1_7_805858745.dbf 330515 01/28/2013 01:39:05
8 /u01/archive/1_8_805858745.dbf 330515 01/28/2013 01:39:05
9 /u01/archive/1_9_805858745.dbf 330515 01/28/2013 01:39:05
10 /u01/archive/1_10_805858745.dbf 330515 01/28/2013 01:39:05
11 /u01/archive/1_11_805858745.dbf 330515 01/28/2013 01:39:05
12 /u01/archive/1_12_805858745.dbf 330515 01/28/2013 01:39:05
13 /u01/archive/1_13_805858745.dbf 330515 01/28/2013 01:39:05
14 /u01/archive/1_14_805858745.dbf 330515 01/28/2013 01:39:05
15 /u01/archive/1_15_805858745.dbf 330515 01/28/2013 01:39:05
16 /u01/archive/1_16_805858745.dbf 330515 01/28/2013 01:39:05
17 /u01/archive/1_17_805858745.dbf 330515 01/28/2013 01:39:05
18 /u01/archive/1_18_805858745.dbf 330515 01/28/2013 01:39:05
19 /u01/archive/1_19_805858745.dbf 330515 01/28/2013 01:39:05
20 /u01/archive/1_20_805858745.dbf 330515 01/28/2013 01:39:05
21 /u01/archive/1_21_805858745.dbf 330515 01/28/2013 01:39:05
22 /u01/archive/1_22_805858745.dbf 330515 01/28/2013 01:39:05
23 /u01/archive/1_23_805858745.dbf 330515 01/28/2013 01:39:05
24 /u01/archive/1_24_805858745.dbf 330515 01/28/2013 01:39:05
25 /u01/archive/1_25_805858745.dbf 330515 01/28/2013 01:39:05
26 /u01/archive/1_26_805858745.dbf 330515 01/28/2013 01:39:05
27 /u01/archive/1_27_805858745.dbf 330515 01/28/2013 01:39:05
28 /u01/archive/1_28_805858745.dbf 330515 01/28/2013 01:39:05
29 /u01/archive/1_29_805858745.dbf 330515 01/28/2013 01:39:05
30 /u01/archive/1_30_805858745.dbf 330515 01/28/2013 01:39:05
31 /u01/archive/1_31_805858745.dbf 330515 01/28/2013 01:39:05
31 rows selected.
SQL>
SQL> col rtckp for a10
SQL> col rtenb for a10
SQL> l
1* select RTCKP_SCN,RTCKP_RBA_SEQ,RTCKP_RBA_BNO,RTCKP_RBA_BOF,RTSEQ,RTENB from x$kccrt
SQL> /
RTCKP_SCN RTCKP_RBA_SEQ RTCKP_RBA_BNO RTCKP_RBA_BOF RTSEQ RTENB
-------------------------------- ------------- ------------- ------------- ---------- ----------
522089 32 2 16 32 330515
SQL>
SQL> select SEQUENCE#, RESETLOGS_CHANGE# , FIRST_CHANGE# ,NEXT_CHANGE#,NEXT_CHANGE# from v$archived_log;
SEQUENCE# RESETLOGS_CHANGE# FIRST_CHANGE# NEXT_CHANGE# NEXT_CHANGE#
---------- ----------------- ------------- ------------ ------------
1 330515 330515 337841 337841
2 330515 337841 341520 341520
3 330515 341520 346876 346876
4 330515 346876 368713 368713
5 330515 368713 374648 374648
6 330515 374648 381043 381043
7 330515 381043 387102 387102
8 330515 387102 389802 389802
9 330515 389802 394303 394303
10 330515 394303 400362 400362
11 330515 400362 405241 405241
12 330515 405241 411904 411904
13 330515 411904 418076 418076
14 330515 418076 422666 422666
15 330515 422666 445513 445513
16 330515 445513 474666 474666
17 330515 474666 495145 495145
18 330515 495145 517364 517364
19 330515 517364 520726 520726
20 330515 520726 520773 520773
21 330515 520773 520780 520780
22 330515 520780 520783 520783
23 330515 520783 520875 520875
24 330515 520875 521331 521331
25 330515 521331 521334 521334
26 330515 521334 521337 521337
27 330515 521337 521876 521876
28 330515 521876 521884 521884
29 330515 521884 521887 521887
30 330515 521887 522050 522050
31 330515 522050 522089 522089
31 rows selected.
SQL>
select SEQUENCE#, RESETLOGS_CHANGE# , FIRST_CHANGE# ,NEXT_CHANGE#,NEXT_CHANGE#
from v$archived_log
where sequence#>=28
;
SQL> select SEQUENCE#, RESETLOGS_CHANGE# , FIRST_CHANGE# ,NEXT_CHANGE#,NEXT_CHANGE#
2 from v$archived_log
3 where sequence#>=28
4 ;
SEQUENCE# RESETLOGS_CHANGE# FIRST_CHANGE# NEXT_CHANGE# NEXT_CHANGE#
---------- ----------------- ------------- ------------ ------------
28 330515 521876 521884 521884
29 330515 521884 521887 521887
30 330515 521887 522050 522050
31 330515 522050 522089 522089
SQL>
BBED> p kcvfhckp
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x0007f694 521876 改為 521884=0007F69C 9CF60700
ub2 kscnwrp @488 0x0000
ub4 kcvcptim @492 0x2f2c5b2d
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0000001c 28 改為29=1D
ub4 kcrbabno @504 0x00000002 2
ub2 kcrbabof @508 0x0000
ub1 kcvcpetb[0] @512 0x02
ub1 kcvcpetb[1] @513 0x00
ub1 kcvcpetb[2] @514 0x00
ub1 kcvcpetb[3] @515 0x00
ub1 kcvcpetb[4] @516 0x00
ub1 kcvcpetb[5] @517 0x00
ub1 kcvcpetb[6] @518 0x00
ub1 kcvcpetb[7] @519 0x00
BBED>
BBED> p kcvfhcpc
ub4 kcvfhcpc @140 0x00000013 19 v$datafile_header.checkpoint_count
BBED> p kcvfhccc
ub4 kcvfhccc @148 0x00000012 18
BBED>
BBED> m /x 9CF60700 OFFSET 484
BBED-00209: invalid number (9CF60700)
BBED> m /x 9cf6 offset 484
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 484 to 995 Dba:0x01400001
------------------------------------------------------------------------
9cf60700 00000000 2d5b2c2f 01000000 1c000000 02000000 0000097f 02000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0d000d00 0d000100 00000000 00000000 00000000 02004001 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<32 bytes per line>
BBED> m /x 0700 offset 486
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 486 to 997 Dba:0x01400001
------------------------------------------------------------------------
07000000 00002d5b 2c2f0100 00001c00 00000200 00000000 097f0200 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000d00
0d000d00 01000000 00000000 00000000 00000200 40010000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<32 bytes per line>
BBED> p kcvfhckp
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x0007f69c
ub2 kscnwrp @488 0x0000
ub4 kcvcptim @492 0x2f2c5b2d
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0000001c
ub4 kcrbabno @504 0x00000002
ub2 kcrbabof @508 0x0000
ub1 kcvcpetb[0] @512 0x02
ub1 kcvcpetb[1] @513 0x00
ub1 kcvcpetb[2] @514 0x00
ub1 kcvcpetb[3] @515 0x00
ub1 kcvcpetb[4] @516 0x00
ub1 kcvcpetb[5] @517 0x00
ub1 kcvcpetb[6] @518 0x00
ub1 kcvcpetb[7] @519 0x00
BBED> sum apply
Check value for File 5, Block 1:
current = 0x6498, required = 0x6498
BBED>
BBED> set count 16
COUNT 16
BBED> d
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 500 to 515 Dba:0x01400001
------------------------------------------------------------------------
1c000000 02000000 0000097f 02000000
<32 bytes per line>
BBED> m /x 1d
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 500 to 515 Dba:0x01400001
------------------------------------------------------------------------
1d000000 02000000 0000097f 02000000
<32 bytes per line>
BBED> d
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 500 to 515 Dba:0x01400001
------------------------------------------------------------------------
1d000000 02000000 0000097f 02000000
<32 bytes per line>
BBED> sum apply
Check value for File 5, Block 1:
current = 0x6499, required = 0x6499
BBED>
BBED> verify
DBVERIFY - Verification starting
FILE = /test/clonedb/roger01.dbf
BLOCK = 1
DBVERIFY - Verification complete
Total Blocks Examined : 1
Total Blocks Processed (Data) : 0
Total Blocks Failing (Data) : 0
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 0
Total Blocks Marked Corrupt : 0
Total Blocks Influx : 0
Message 531 not found; product=RDBMS; facility=BBED
BBED>
SQL> recover datafile 5;
ORA-00279: change 521884 generated at 08/16/2012 03:21:17 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_29_805858745.dbf
ORA-00280: change 521884 for thread 1 is in sequence #29
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
Log applied.
Media recovery complete.
SQL> alter database datafile 5 online;
Database altered.
SQL> alter database open;
Database altered.
相關推薦
用bbed修改資料檔案頭,跳過丟失的歸檔
conn lunar/lunar create table t1 tablespace rogertbs as select * from dba_objects; create table t2 tablespace rogertbs as select * fr
跳過丟失歸檔進行恢復
sequence spec sed mine rdb 跳過 ora- value corrupt 在我們恢復的時候,發現中間缺失歸檔,大部分dba覺得從缺失的歸檔開始以後的歸檔都無法進行恢復。可是我們從很規的方式,改動數據文件相應的信息是能夠跳過該缺失的歸檔,而且利
mysql忘記密碼,跳過許可權修改密碼
1.找到你的C盤 左上角有個組織點一下進入資料夾和搜尋選項 在點檢視 然後在點顯示隱藏檔案 這時候C盤就出現一個ProgramData 2.點選ProgramData>MySQL>MySQL Server 5.7>my.ini(編輯此檔案) 找到圖片所在的地方 在m
python對同一個資料夾下進行遍歷操作,跳過處理過的
import os path="路徑" #此處路徑為包含你要處理檔案的路徑 for filename in os.listdir(path): (fname,fename)=os.path.splittext(filename) if(fename=='.j
Flask第四天-MongoDB介紹、增刪改查、資料型別、比較符、查詢關鍵字、修改器、排序選取跳過
db 檢視當前資料庫 show dbs 查詢所有資料庫(在物理磁碟上的) u
在Jupyter notebook和spyder上用python做資料探勘,安裝使用簡介和常見錯誤
這裡借知乎使用者的幾句對Jupyter notebook評價: 我很喜歡Jupyter,使用的過程就好比拿紙和筆,還有計算器做數學演算. 而且可以把草稿輕鬆擦掉。比如,要寫個小Paper,完全可以用Jupyter來做,程式碼和論述完美的結合了,而且直接還
使用innodb_data_file_path修改資料檔案位置,發生The server quit without updating PID file錯誤的解決原因及方法。
近日,給CentOS下的MySQL配置資料檔案位置,但是每次指定到非MySQL預設安裝目錄的時候,就無法啟動,並且報“The server quit without updating PID file”錯誤。仔細檢查,是許可權錯誤,包括a. MySQL對新建的資料夾是沒有訪
讀取bmp圖片的檔案頭,與點陣圖資訊頭
#define _CRT_SECURE_NO_WARNINGS #include <string> #include <Windows.h> void eee(FILE* fp) { BITMAPFILEHEADER bf =
用python進行資料預處理,過濾特殊符號,英文和數字。(適用於中文分詞)
要進行中文分詞,必須要求資料格式全部都是中文,需求過濾掉特殊符號、標點、英文、數字等。當然了使用者可以根據自己的要求過濾自定義字元。 實驗環境:python、mysql 實驗目的:從資料庫讀取資料,
bash 指令碼程式設計一 檔案頭,註釋 和 變數
檔案開頭#!/bin/bash#! 是所有linux指令碼檔案開頭的符號, 後面的/bin/bash表示是使用/bin/bash為直譯器來執行本檔案的指令碼執行檔案bash some.sh 或者 sh some.sh 也行,原因是檔案頭已經說明了這是bash直譯器, 所以不會
有哪些好用的網際網路資料抓取,資料採集,頁面解析工具?
1、 網際網路剛興起的時候,資料索引是個大問題,當時Yahoo的分類頁面著實火了一陣子。 2、隨著網際網路資料量越來越大,Google,百度等搜尋引擎火了起來。這個階段,幾乎沒有比搜尋引擎更火的技術了,連帶分詞技術都火得一塌糊塗。緊接著, Nutch等開源搜
iOS 通過圖片檔案頭,獲取圖片型別,以及圖片尺寸
有時候,我們需要獲取一個圖片的格式和大小,但是卻不想從記憶體中把它的整個檔案從記憶體中讀取出來 因為讀取整個檔案的記憶體耗費還是有些的,所以這麼做通常不可取。 實在需要讀取那也沒辦法。 但是其實是可以從檔案中讀取出來。 原因是圖片檔案的格式標準。 這些標準的存在使得可以只讀
Android用OKHttp進行資料請求時,統一給所有介面新增某個請求引數
作為Android端最主流的聯網框架,OkHttp已經被很多人在很多專案中使用,可能大多數人都是會把OkHttp依賴加進去,然後初始化後再用retrofit來訪問介面,但是在開發過程中,如果做對應語言訊息返回的時候 比如手機是中文,服務端返回資料的提示就是中
用WEKA進行資料探勘,第2部分:分類和群集
簡介 在 用 WEKA 進行資料探勘,第 1 部分:簡介和迴歸,我介紹了資料探勘的概念以及免費的開源軟體 Waikato Environment for Knowledge Analysis(WEKA),利用它可以挖掘資料來獲得趨勢和模式。我還談到了第一種資料探勘的方法 —
Dll注入--修改PE檔案頭
DLL注入,除了常見的遠執行緒注入,掛鉤和修改登錄檔以外還可以通過修改PE檔案頭來達到注入目的,廢話少說先上菜。 1. 思路 PE檔案經常會呼叫外部DLL檔案,而需要呼叫的DLL檔案都會在PE檔案說明,通過 NT頭->可選頭->匯入表 可以找
Oracle RedoLog-二進位制格式分析,檔案頭,DML,DDL
上篇文章,簡單介紹了 RedoLog 是什麼,以及怎麼從 Oracle Dump 二進位制日誌。接下來,分析下 Redo Log 二進位制檔案的格式,主要包括:**檔案頭**,**重做日誌頭**,**DML-INSERT 操作**,**DDL-CREATE 操作**。 Redo Log 二進位制檔案中,採用
SourceTree跳過Atlassian賬號,免登陸,跳過初始設置
oca ini 未在 copy 直接 def cred 授權 users SourceTree 安裝之後需要使用賬號登陸以授權,並且是強制登陸。 登錄過程非常漫長,並未在不FQ的情況下是不能成功的,下面記錄一下跳過登錄的方法。 裝之後,轉到用戶本地文件夾下的 S
debian/liunx更新源: 不支持 'amd' 體系結構,跳過配置文件 'non-free/binary-amd/Packages
捕獲 軟件包 free -s 軟件 binary amd debian 不支持 忽略:1 http://mirrors.ustc.edu.cn/debian stretch InRelease命中:2 http://mirrors.ustc.edu.cn/debian st
JSch登入sftp,跳過 Kerberos username 身份驗證提示
一般情況下,我們登入sftp伺服器,使用者名稱認證或者金鑰認證即可。 但是如果對方伺服器設定了Kerberos 身份驗證,而已方又沒有對應的配置時,則會提示輸入 Kerberos username [xxx] Kerberos password 此時,簡單的解決辦法是,可以去掉Ke
MySQL複製衝突,跳過事物
日常生產中存在資料衝突導致的主從中斷,本文章模擬下主從中斷場景及修復。 1、兩臺主機互為主主,ip分別為192.168.26.75、192.168.26.76,以下簡稱75、76。目前複製正常。 2、在75操作,斷開76到75的複製。並在76插入一條資料,其中id為主鍵,具有唯一性。