eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« tkprof的含义 | Blog首页 | Oracle的前尘旧版 »

临时文件file#和db_files的关系
modb.pro

 在v$tempfile与v$sort_usage之关系解析一文中,我们注意到对于临时文件的绝对文件号(AFN),Oracle的分配规则和常规数据文件并不相同.

实际上,临时文件的绝对文件号应该等于db_files + file#.

我们看一下实例:
SQL> select indx,tfnum,tfafn,tfcsz
            2  from x$kcctf;
            INDX      TFNUM      TFAFN      TFCSZ
            ---------- ---------- ---------- ----------
            0          1        201       2560
            SQL> show parameter db_files
            NAME                                 TYPE        VALUE
            ------------------------------------ ----------- --------------
            db_files                             integer     200
            SQL> select file#,name from v$tempfile;
            FILE# NAME
            ---------- -----------------------------------------
            1 +ORADG/danaly/tempfile/temp.267.600173887
            SQL>
            

所以在 Oracle 文档中v$tempfile.file#被定义为The absolute file number是不确切的.
经常的,我们可能会在警报日志文件中看到类似如下的错误:
***
            Corrupt block relative dba: 0x00c0008a (file 202, block 138)
            Bad header found during buffer read
            Data in bad block -
            type: 8 format: 2 rdba: 0x0140008a
            last change scn: 0x0000.431f8beb seq: 0x1 flg: 0x08
            consistency value in tail: 0x8beb0801
            check value in block header: 0x0, block checksum disabled
            spare1: 0x0, spare2: 0x0, spare3: 0x0
            ***
            


这里的file 202其实指的就是临时文件.
感谢Eagle Fan的提醒.

 


历史上的今天...
    >> 2013-03-28文章:
    >> 2012-03-28文章:
           JRE问题之未解决 - 备案
    >> 2011-03-28文章:
    >> 2009-03-28文章:
    >> 2008-03-28文章:
    >> 2005-03-28文章:

By eygle on 2006-03-28 15:45 | Comments (0) | Internal | 724 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com