ORA-00382: string not a valid block size, valid range [string..string] ORACLE 报错 故障修复 远程处理

文档解释

ORA-00382: string not a valid block size, valid range [string..string]

Cause: User specified a value for db_nk_cache_size where n is one of {2, 4, 8, 16, 32}, but nk is not a valid block size for this platform.

Action: Remove corresponding parameter from the “init.ora” file and restart the instance.

ORA-00382:表示输入的块大小无效,有效块大小区间[string..string]。

官方解释

ORA-00382: string not a valid block size, valid range [string..string]

Cause: an invalid block size was specified in the input string. Only integers between 512 and 32K are currently supported.

Action: Specify a valid block size.

常见案例

在使用Data Guard时,如果把主控系统的block size设置的于一个不合法的大小,那么就会报ORA-00382这样的错误。

正常处理方法及步骤

1. 查看当前Block size cs VS SAM:

可以使用如下脚本来查看:

select dbms_metadata.get_ddl(‘TABLESPACE’,’USER_DATA’, db_name )

from v$database;

2. 修改当前Block size cs VS SAM

可以使用如下SQL来修改:

alter tablespace USER_DATA block size 8K;

注意:有些情况下,使用alter tablespace…block size 8K不能成功,并且报出ORA-00382错误,此时可以先添加一个新的表空间,将其替换掉原有的表空间:

Create tablespace USER_DATA2 datafile “ORACLE_HOME\oradata\USER_DATA.dbf” size 500m block size 8k;

Alter table USER_DATA rename to USER_DATA2;

Alter tablespace USER_DATA2 rename to USER_DATA;

3. 修改完Block size cs VS SAM后,重建standby:

sql> alter database commit to switchover to physical standby;

sql> alter database start logical standby apply immediate;


数据运维技术 » ORA-00382: string not a valid block size, valid range [string..string] ORACLE 报错 故障修复 远程处理