文章目录
前言
一、非标准块表空间
二、脚本实验
1.创建非标准块表空间
查询当前的数据库数据块的大小
show parameter db_block_size;
2.创建数据块大小为2k的表空间
SQL> create tablespace test2k
datafile '/opt/oracle/app/oradata/orcl/test2k01.dbf' size 10m blocksize 2k;
create tablespace test2k
datafile '/opt/oracle/app/oradata/orcl/test2k01.dbf' size 10m blocksize 2k
*
ERROR at line 1:
ORA-29339: tablespace block size 2048 does not match configured block sizes
修改动态参数db_2k_cache_size=3m
alter system set db_2k_cache_size=3m;
创建数据块大小为2k的表空间
SQL> create tablespace test2k
datafile '/opt/oracle/app/oradata/orcl/test2k01.dbf'
size 10m blocksize 2k;
Tablespace created.
3.验证是否创建成功
select tablespace_name,
status,
block_size,
contents
from dba_tablespaces
where tablespace_name = 'TEST2K';