The size of datafile recorded in the Oracle database datafile header

Source: Internet
Author: User

Environment of this article: Oracle databae 12.1.0.2, rhel5.9 x86-64bit

[[email protected] orcl]$ pwd/u01/app/oracle/oradata/orcl[[email protected] orcl]$ ls-lrttotal 2386544drwxr-x---2 oracle oinstall 4096 Dec pdbseeddrwxr-x---2 oracle oinstall 4096 Dec pn1d Rwxr-x---2 oracle oinstall 4096 DEC pn2-rw-r-----1 Oracle oinstall 5251072 Jul 13:26 users01.dbf-rw-r -----1 Oracle Oinstall 52429312 13:26 redo03.log-rw-r-----1 Oracle oinstall 52429312 Jul 13:26 redo01.log-rw -R-----1 Oracle oinstall 74457088 20:01 temp01.dbf-rw-r-----1 Oracle oinstall 602939392 Jul 20:25 undotbs01.d BF-RW-R-----1 Oracle oinstall 870326272 20:25 system01.dbf-rw-r-----1 Oracle oinstall 765468672 Jul 20:25 Sysa UX01.DBF-RW-R-----1 Oracle oinstall 52429312 Jul 20:26 redo02.log-rw-r-----1 Oracle oinstall 17973248 Jul 31 20:26 Control01.ctl[[email protected] orcl]$ dd if=/u01/app/oracle/oradata/orcl/system01.dbf bs=512 count=1 | Od-x1+0 Records in1+0 records out512 bytes (+ B) cOpied, 0.027559 seconds, 18.6 kb/s0000000 a200 0000 0000 ffc0 0000 0000 0000 00000000020 6567 0000 a 0000 9f00 0001 7C7 d 7a7b0000040 81a0 0000 0000 0000 0000 0000 0000 00000000060 0000 0000 0000 0000 0000 0000 0000 0000*0001000[[email p Rotected] orcl]$ dd if=/u01/app/oracle/oradata/orcl/system01.dbf bs=512 count=1 |           Od-i1+0 Records in1+0 records out512 bytes (+ B) copied, 2.9e-05 seconds, 17.7 mb/s0000000 41472-4194304           0 00000020 25959 8192 106240 20549131490000040 33184 0 0 00000060 0 0 0 0*0001000[[email protected] orcl]$ [[email protecte D] orcl]$ [[email protected] orcl]$ ls-lrt8192*106240=870318080 and LS- The LRT results show that the size of SYSTEM01.DBF is: 870326272870326272-870318080=8192, and one of the many is the OS header in DataFile, see article: How to Detect and Fix a Corruption in the datafile OS header/block zero-ora-27047 DBV-107 ora-1157/ora-27048 (document ID 360032.1)


8192 manual calculation process;
2000 0000 After flipping: 00002000, converted to decimal, is 8192

106240 Manual calculation process:
9F00 0001 flipped: 00019f00, converted to decimal, is 106240
Reference article:
How to GET datafile SIZE THROUGH DD (document ID 274445.1)
Note: This article can only provide the idea of calculation, in fact, the number of DB block inside the conversion process is wrong.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The size of datafile recorded in the Oracle database datafile header

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.