Bo's Oracle Station

查看: 2464|回复: 0

(52-20)第37次:2015-12-30星期三

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-1-1 21:35:16 | 显示全部楼层 |阅读模式
(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




  1. select  * from v$backup_corruption;

  2. select  * from v$copy_corruption;

  3. select  * from v$database_block_corruption;
复制代码


回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-20 22:28 , Processed in 0.040117 second(s), 27 queries .

快速回复 返回顶部 返回列表