Home > Database > Mysql Tutorial > Oracle中临时文件File#和Db_files关系

Oracle中临时文件File#和Db_files关系

WBOY
Release: 2016-06-07 16:18:41
Original
1376 people have browsed it

在v$tempfile与v$sort_usage之关系解析一文中,我们注意到对于临时文件的绝对文件号(AFN),Oracle的分配规则和常规数据文件并不相同。 实际上,临时文件的绝对文件号应该等于db_files + file#。 我们看一下实例:SQL select indx,tfnum,tfafn,tfcsz 2 from x$kc

在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其实指的就是临时文件。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template