oracle bbed安装(四)
racle 11g下的安装
BBED is not available in 11g but you can still link it after getting the following files
from any previous version like 10gR2.
Copy $ORA10g_HOME/rdbms/lib/ssbbded.o to $ORA11g_HOME/rdbms/lib
Copy $ORA10g_HOME/rdbms/lib/sbbdpt.o to $ORA11g_HOME/rdbms/lib
Message files (list may differ):
Copy $ORA10g_HOME/rdbms/mesg/bbedus.msb to $ORA11g_HOME/rdbms/mesg
Copy $ORA10g_HOME/rdbms/mesg/bbedus.msg to $ORA11g_HOME/rdbms/mesg
Copy $ORA10g_HOME/rdbms/mesg/bbedar.msb to $ORA11g_HOME/rdbms/mesg
Issue the following command:
make -f $ORA11g_HOME/rdbms/lib/ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed
$ORACLE_HOME/bin/bbed
$ORA11g_HOME/bin/bbed
password: blockedit
实验一
利用bbed恢复(实验如盖总说的不可模仿)
查找377block
SQL> select segment_name,file_id,block_id from dba_extents where block_id=377;
SEGMENT_NAME
--------------------------------------------------------------------------------
FILE_ID BLOCK_ID
---------- ----------
BOOTSTRAP$
1 377
_SYSSMU3$
2 377
I_DIR$INSTANCE_JOB_NAME
3 377
SQL> select * from bootstrap$ where rownum<2;
LINE# OBJ#
---------- ----------
SQL_TEXT
--------------------------------------------------------------------------------
-1 -1
8.0.0.0.0
www.2cto.com
SQL> update bootstrap$ set sql_text='9.0.0.0.0' where line#=-1;
1 row updated.
SQL> commit;
Commit complete.
SQL> select * from bootstrap$ where rownum<2;
LINE# OBJ#
---------- ----------
SQL_TEXT
--------------------------------------------------------------------------------
-1 -1
9.0.0.0.0
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 104859216 bytes
Database Buffers 176160768 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
查看日志
[root@test bdump]# tail -f alert_wolf.log
SMON: enabling cache recovery
Mon Jul 16 03:55:39 2012
Errors in file /opt/app/oracle/admin/wolf/udump/wolf_ora_23472.trc:
ORA-00704: bootstrap process failure
ORA-00702: bootstrap verison '9.0.0.0.0' inconsistent with version '8.0.0.0.0'
Mon Jul 16 03:55:39 2012
Error 704 happened during db open, shutting down database
USER: terminating instance due to error 704
Instance terminated by USER, pid = 23472
ORA-1092 signalled during: ALTER DATABASE OPEN...
www.2cto.com
这步照着书上改的
BBED> modify /c "8" offset 1276
File: /opt/app/oracle/oradata/wolf/system01.dbf (1)
Block: 378 Offsets: 1276 to 1284 Dba:0x0040017a
------------------------------------------------------------------------
38000000 00000000 00
<32 bytes per line>
BBED> verify
DBVERIFY - Verification starting
FILE = /opt/app/oracle/oradata/wolf/system01.dbf
BLOCK = 378
Block 378 is corrupt
Corrupt block relative dba: 0x0040017a (file 0, block 378)
Bad check value found during verification
Data in bad block:
type: 6 format: 2 rdba: 0x0040017a
last change scn: 0x0000.00087dc5 seq: 0x1 flg: 0x06
spare1: 0x0 sp