Plans | Login    

Briefing Search
Keyword:
Category:

       

    
Author Details
OrSkl Academy
orskltrainer@gmail.com
www.orskl.com/

How to find block sizes of all Oracle Database files?


We must have known already that block sizes of non-system tablespaces can be controlled and altered, but did you ever think of block sizes of Control files and Redo log files in the database?

BriefingWire.com, 3/05/2016 - We must have known already that block sizes of non-system tablespaces can be controlled and altered, but did you ever think of block sizes of Control files and Redo log files in the database? How to check their block sizes if they have so, can we alter them when required? Well, it is really very important for us to understand these block level concepts.

I did not get some chance to look at this area until I faced a performance issue on one of the database environments I work. Through the process of looking at the issue, I could notice that block size of redo log files is not compatible to the underlined attached storage. This problem is one such real time example of the topic we discussed earlier “How important is disk type for Oracle database files?”.

In this blog, we will discuss only block sizes of control files and redo log files as modifying block sizes on tablespace level is something I hope we would have known it already.

System consideration:

We will be using database server for our next phase of discussion with following configuration:

? OS: Oracle Enterprise Linux

? Database: Oracle 12c database

? Type: Non-CDB database

Control file block size:

Before we actually look at identifying the block size of control file, let us see the default block size of the database.

SQL> show parameter db_block_size

NAME TYPE VALUE

———————————— ———– ———————-

db_block_size integer 8192

It is 8KB on my system, alright now let us check the block size of the control files on this database server.

SQL> select BLOCK_SIZE from v$controlfile;

BLOCK_SIZE

———-

16384

16384

There are two control files on my system each of 16KB size, Aww!!! Should it not be the default block size of 8KB? Well, you see that right. Oracle says that irrespective of block size supported by OS or storage control file block size will always remain 16KB and that cannot be altered.

Will this create any issue? I don’t see that this is as problematic until unless your minimum block size at your operating system is more than 16KB ex: 32KB. When minimum block size at the OS level is 4KB or 8KB then Oracle can bundle 4 blocks or 2 blocks respectively to create one logical block for the control file. Interesting isn’t it!!!

Redo log block size:

Block size of redo log files are bit different from control files which we have seen so far. Let us quickly check the current block size of all the redo logs on my server. Note that I did not specify any block size of the redo logs when I created this database, so the output below is the default size created by DBCA.

SQL> select BLOCKSIZE from v$log;

BLOCKSIZE

———-

512

512

512

That’s 512B on my system. Just like control file, block size of redo log is not same as the default database block size(8KB).

But can we have a redo log files of different block sizes, I tried creating two other groups with 1KB , 4KB and 8KB.

SQL> alter database add logfile group 4 size 5M blocksize 1024;

ERROR at line 1:

ORA-01377: Invalid log file block size

SQL> alter database add logfile group 4 size 5M blocksize 4096;

ERROR at line 1:

ORA-01378: The logical block size (4096) of file

/pdbdata/ORACDB3/onlinelog/o1_mf_4_%u_.log is not compatible with the disk

For More Information Contact us: http://www.orskl.com/how-to-find-block-sizes-of-all-oracle-database-files/

Address:

A9, 1st Floor,

Indian Airlines Employees Colony,

Begumpet,

Secunderabad.

 
 
FAQs | Contact Us | Terms & Conditions | Privacy Policy
© 2026 Proserve Technology, Inc.