(52-20)上完1Z0-052第05章
http://124.16.180.178:8080/studentguide_sec_O11g/MOS
游客,本帖隐藏的内容需要积分高于 100 才可浏览,您当前积分为 0
physical-block.sh:
- #!/bin/sh
- v_dbname=orcl
- su - oracle -c "/u01/app/oracle/product/11.2.0/dbhome_1/bin/srvctl stop database -d $v_dbname"
- su - oracle -c "/u01/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus /nolog" <<EOF
- conn / as sysdba
- startup mount exclusive
- EOF
- rm -f /home/oracle/example01.dbf 2>/dev/null
- su - oracle -c "/u01/app/oracle/product/11.2.0/dbhome_1/bin/rman target /" <<EOF
- backup as copy datafile 5 format '/home/oracle/example01.dbf';
- EOF
- dd if=/dev/zero of=/home/oracle/example01.dbf bs=8192 count=1 seek=175 conv=notrunc
- su - oracle -c "export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/grid ; export ORACLE_SID=+ASM ; /u01/app/oracle/product/11.2.0.3/grid/bin/asmcmd" <<EOF
- rm -f +data/$v_dbname/DATAFILE/example*
- EOF
- su - oracle -c "/u01/app/oracle/product/11.2.0/dbhome_1/bin/rman target /" <<EOF
- run {
- set maxcorrupt for datafile 5 to 1;
- backup as copy datafilecopy '/home/oracle/example01.dbf' format '+data';
- }
- EOF
- sleep 3
- su - oracle -c "/u01/app/oracle/product/11.2.0/dbhome_1/bin/rman target /" <<EOF
- delete noprompt datafilecopy '/home/oracle/example01.dbf';
- switch datafile 5 to copy;
- EOF
- su - oracle -c "/u01/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus /nolog" <<EOF
- conn / as sysdba
- alter database open;
- EOF
复制代码
rowid到块号:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
a b c d e f g h i j k l m n o p q r s t u v w x y z
26 51
0 1 2 3 4 5 6 7 8 9 0
52 61
+ \
62 63
Cv=2*64+47=175
- select * from v$backup_corruption;
- select * from v$copy_corruption;
- select * from v$database_block_corruption;
复制代码
|