Sunday, August 11, 2024

ORA-29339: tablespace block size 4096 does not match configured block sizes

SQL> create tablespace testtbs blocksize 4k datafile '+DATA' size 2m; 

create tablespace testtbs blocksize 4k datafile '+DATA' size 2m 

* 

ERROR at line 1: 

ORA-29339: tablespace block size 4096 does not match configured block sizes  

ORA-29339 is returned due to not setting the appropriate buffer cache before creating a non-default block size tablespace. Init parameter db_block_size mentions the default block size of the database and same block size if used by default when a tableapce is created. Default buffer cache (db_buffer_cache) stores datablocks for default block size tableapces data in the memory. 

If you want to create a tablespace with non-default block size, you need to first set buffer cache for the block size of this new tablesapce. For example, set parameter db_4k_buffer_cach if you want to create a tablesapce with 4k block size in a database where default block size is already set to 8k, 16k or 32k. 

 Buffer cache is to be set and CDB level, as follows 

SQL> alter system set db_4k_cache_size=200m scope=memory; 

 

SQL> create tablespace testtbs blocksize 4k datafile '+DATA' size 2m; 

  

Tablespace created. 

 

No comments:

Post a Comment

Popular Posts - All Times