[20170302]fuzzy保存在那里.txt

简介: [20170302]fuzzy保存在那里.txt --参考链接:http://blog.itpub.net/267265/viewspace-2134551/ --提到fuzzy表示某种状态,正常关闭是NO.

[20170302]fuzzy保存在那里.txt

--参考链接:http://blog.itpub.net/267265/viewspace-2134551/
--提到fuzzy表示某种状态,正常关闭是NO.
--从访问的视图看v$datafile_header,应该这个信息保存在数据文件头,找找具体的位置在那里.

1.环境:
SYS@book> @ &r/ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

--//从冷备份拷贝回来,我这个冷备份是异常关机的.利用异常恢复scn到那里3介绍的方法:
--//链接:http://blog.itpub.net/267265/viewspace-2134595/

recover database until change 13276911100;
recover database ;

--//这样2中恢复方式,fuzzy前者是yes,后者是no.通过对比是否可以确定问题.

2.测试1:
SYS@book> recover database until change 13276911100;
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/mnt/ramdisk/book/system01.dbf'


SYS@book> SELECT file#, CHECKPOINT_CHANGE#, CHECKPOINT_TIME,CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy,name,tablespace_name  FROM v$datafile_header where file#=1;
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME     CREATION_CHANGE# RESETLOGS_CHANGE# STATUS     CHECKPOINT_COUNT FUZ NAME                                               TABLESPACE_NAME
----- ------------------ ------------------- ---------------- ----------------- ---------- ---------------- --- -------------------------------------------------- ------------------------------
    1        13276911100 2017-02-28 14:42:35                7            925702 ONLINE                  838 YES /mnt/ramdisk/book/system01.dbf                     SYSTEM

SYS@book> shutdown immediate ;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

$ cp /mnt/ramdisk/book/tea01.dbf /u01/backup/fuzzy/tea01.dbf_yes

3.测试2:
SYS@book> recover database ;
Media recovery complete.
SYS@book> SELECT file#, CHECKPOINT_CHANGE#, CHECKPOINT_TIME,CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy,name,tablespace_name  FROM v$datafile_header where file#=1;
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME     CREATION_CHANGE# RESETLOGS_CHANGE# STATUS     CHECKPOINT_COUNT FUZ NAME                                               TABLESPACE_NAME
----- ------------------ ------------------- ---------------- ----------------- ---------- ---------------- --- -------------------------------------------------- ------------------------------
    1        13276931100 2017-02-28 14:42:35                7            925702 ONLINE                  839 NO  /mnt/ramdisk/book/system01.dbf                     SYSTEM
--//关闭数据库分析.

$ cp /mnt/ramdisk/book/tea01.dbf /u01/backup/fuzzy/tea01.dbf_no

4.对比:
$ dd if=tea01.dbf_yes of=yes.dd bs=8192 skip=1 count=1
1+0 records in
1+0 records out
8192 bytes (8.2 kB) copied, 0.000102445 seconds, 80.0 MB/s

$ dd if=tea01.dbf_no of=no.dd bs=8192 skip=1 count=1
1+0 records in
1+0 records out
8192 bytes (8.2 kB) copied, 9.2346e-05 seconds, 88.7 MB/s

$ xxd -c 16 yes.dd > yes.txt
$ xxd -c 16 no.dd > no.txt

$ diff  yes.txt no.txt
2c2
< 0000010: d5ce 0000 0000 0000 0004 200b 6e21 b74f  瘴........ .n!.O
---
> 0000010: 8693 0000 0000 0000 0004 200b 6e21 b74f  .......... .n!.O 
9,10c9,10
< 0000080: 0000 0000 0000 0000 0000 0400 d400 0000  ............?..
< 0000090: 4974 e237 d300 0000 0000 0000 0000 0000  It??..........
---
> 0000080: 0000 0000 0000 0000 0000 0000 d500 0000  ............?..
> 0000090: dc74 e237 d400 0000 0000 0000 0000 0000  躷??..........
24c24
< 0000170: 0600 0000 0000 0000 0000 0000 0000 0000  ................
---
> 0000170: 0600 0000 0000 0000 0000 0000 fe1b da37  ............??
31c31
< 00001e0: 0000 0000 fc95 5d17 0300 0000 dbbb db37  ....?].....??
---
> 00001e0: 0000 0000 1ce4 5d17 0300 0000 dbbb db37  .....鋆.....??

--通过bbed观察:
--ub2 chkval_kcbh                          @16       0x9386 -->检查和
--ub4 kcvfhcpc                             @140      0x000000d5 => d5 = 213 检查记数
--ub4 kcvfhrts                             @144      0x37e274dc
--ub4 kcvfhrft                             @380      0x37da1bfe

--//猜测这个可能性最大:
BBED> p kcvfhsta
ub2 kcvfhsta                                @138      0x0000 (NONE)


BBED> assign kcvfhsta=0x0040
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
ub2 kcvfhsta                                @138      0x0040 (NONE)

BBED> sum apply
Check value for File 6, Block 1:
current = 0x93c6, required = 0x93c6

SYS@book> SELECT file#, CHECKPOINT_CHANGE#, CHECKPOINT_TIME,CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy,name,tablespace_name  FROM v$datafile_header;
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME     CREATION_CHANGE# RESETLOGS_CHANGE# STATUS     CHECKPOINT_COUNT FUZ NAME                             TABLESPACE_NAME
----- ------------------ ------------------- ---------------- ----------------- ---------- ---------------- --- -------------------------------- ---------------
    1        13276931100 2017-02-28 14:42:35                7            925702 ONLINE                  839 NO  /mnt/ramdisk/book/system01.dbf   SYSTEM
    2        13276931100 2017-02-28 14:42:35             1834            925702 ONLINE                  828 NO  /mnt/ramdisk/book/sysaux01.dbf   SYSAUX
    3        13276931100 2017-02-28 14:42:35           923328            925702 ONLINE                  749 NO  /mnt/ramdisk/book/undotbs01.dbf  UNDOTBS1
    4        13276931100 2017-02-28 14:42:35            16143            925702 ONLINE                  834 NO  /mnt/ramdisk/book/users01.dbf    USERS
    5        13276931100 2017-02-28 14:42:35           952916            925702 ONLINE                  745 NO  /mnt/ramdisk/book/example01.dbf  EXAMPLE
    6        13276931100 2017-02-28 14:42:35      13276257767            925702 ONLINE                  213 YES /mnt/ramdisk/book/tea01.dbf      TEA
6 rows selected.

--猜测正确. file#=6 FUZ=YES.

SYS@book> alter database open ;
alter database open
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [3648], [6], [64], [], [], [], [], [], [], [], [], []
--猜测一下[6]估计指数据文件6.

--//修改回来.
BBED> set dba 6,1
        DBA             0x01800001 (25165825 6,1)

BBED> assign kcvfhsta=0x0
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
ub2 kcvfhsta                                @138      0x0000 (NONE)

BBED> sum apply
Check value for File 6, Block 1:
current = 0x9386, required = 0x9386

SYS@book> select open_mode from v$database ;
OPEN_MODE
--------------------
MOUNTED

SYS@book> alter database open ;
Database altered.

目录
相关文章
|
7月前
|
C#
C#读取txt文本的行数
C#读取txt文本的行数
208 0
|
7月前
|
弹性计算 运维 Shell
批量将txt 文件修改为doc 文件
【4月更文挑战第29天】
60 1
|
Web App开发 存储 数据可视化
VCF文件修改染色体格式的方法
VCF文件修改染色体格式的方法
|
数据处理 索引 Python
Bioinfo|bedtools-操作VCF文件
Bioinfo|bedtools-操作VCF文件
274 0
|
Python
使用pysam操作VCF/BCF文件
使用pysam操作VCF/BCF文件 读取和写出 from pysam import VariantFile bcf_in = VariantFile("test_in.
1922 0
|
SQL 测试技术 索引
[20180509]函数索引问题.txt
[20180509]函数索引问题.txt https://jonathanlewis.wordpress.com/2018/05/07/fbis-dont-exist/ --//重复测试: 1.
1127 0
|
机器学习/深度学习 算法
如何过滤freebayes得到原始vcf文件
变异检测算法的核心就是从尽可能找到真实的变异,降低假阳性。尽管目前测序仪器的准确性可以达到99.999%,似乎很高的样子,但是对于高通量测序而言,这意味着在100,000个碱基中就可能出现一个错误,那么freebayes如何保证自己结果的可靠性? freebayes基于贝叶斯公式 贝叶斯公式 简单的说,当一个变异如果只出现在一条链上,或者是某一个位置上,那么这个位点很有可能是高通量测序时引入的偏误。
1324 0
|
关系型数据库 Linux 索引
[20180212]函数索引问题.txt
[20180212]函数索引问题.txt --//11g下,如果函数索引,字段出现重复,出现ORA-54015: Duplicate column expression was specified.
998 0
|
Oracle 关系型数据库 Linux
[20171031]rman merge例子2.txt
[20171031]rman merge例子2.txt --//以前做的测试 [20170626]rman merge例子.txt --//链接 http://blog.
1009 0