zoukankan      html  css  js  c++  java
  • ORA-00379 缓冲池 DEFAULT 中无法提供 32K 块大小的空闲缓冲区

    (一)问题

    今天在使用Pl/sql developer查看表空间大小的时候,报错误:ORA-00379 缓冲池 DEFAULT 中无法提供 32K 块大小的空闲缓冲区,具体如下图:

    SQL> select * from dba_data_files;

     

    通过网上查找问题原因,最终发现是因为之前设置了db_32k_cache_size参数,并且建立了32k block size大小的表空间,但是现在用了旧的参数文件,导致无法为相应的块按照32k的block_size来分配buffer cache。

    在与我的数据库的实际情况比对,发现数据库db_32k_cache_size值如下:

    SQL> show parameter cache
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    client_result_cache_lag              big integer 3000
    client_result_cache_size             big integer 0
    db_16k_cache_size                    big integer 0
    db_2k_cache_size                     big integer 0
    db_32k_cache_size                    big integer 0
    db_4k_cache_size                     big integer 0
    db_8k_cache_size                     big integer 0
    db_cache_advice                      string      ON
    db_cache_size                        big integer 0
    db_flash_cache_file                  string      
    db_flash_cache_size                  big integer 0
    db_keep_cache_size                   big integer 0
    db_recycle_cache_size                big integer 0
    object_cache_max_size_percent        integer     10
    object_cache_optimal_size            integer     102400
    result_cache_max_result              integer     5
    result_cache_max_size                big integer 1920K
    result_cache_mode                    string      MANUAL
    result_cache_remote_expiration       integer     0
    session_cached_cursors               integer     50

    在看表空间数据块的大小,发现有32K块表空间的存在:

     

     由此基本可以得出结论:ORA-00379错误是由于创建了非标准块表空间,但是在之后因为参数修改或参数文件的替换导致db_Nk_cache_size不满足要求引起。 

    (二)解决方案

     有2种解决方案,一种是删除非标准块的表空间,另一种是重新设置初始化参数db_Nk_cache_size参数。

    (方法一)删除表空间

    SQL> drop tablespace tbs_32k including contents and datafiles;

    在执行查询 

    select * from dba_data_files;

     不再报错。

    (方法二)修改初始化参数

    SQL> alter system set db_32k_cache_size=16m;
    
    System altered

    再次执行查询,不再报错。

    (三)补充

    Oracle数据块是数据库中最小的逻辑单元,分为标准块和非标准块两种。其中,标准块的大小在数据库创建时由参数db_block_size参数决定,其后不可更改,通常设置为4K或8K。Oracle 11g最多可以设置4钟不同大小的非标准块,可以为2K、4K、8K、16K、32K。

    如果要使用非标准数据块创建表空间,需要在数据库初始化参数文件(spfile)中为每个非标准块在数据库高速缓存区中分配缓存空间,当非标准块高速缓存分配完成后,就可以创建基于非标准块的表空间了。

  • 相关阅读:
    使用keepalived实现双机热备
    MYSQL ERROR CODE 错误编号的意义
    Mysql slow query log
    eclipse svn 分支合并到主干
    Timer的schedule和scheduleAtFixedRate方法的区别解析
    Java内部类引用外部类中的局部变量为何必须是final问题解析
    nginx中有关命令和日志切割,配置文件加载的详细阐述
    流媒体中ffmpeg 命令的使用
    windows下搭建nginx服务器及实现nginx支持https配置流程
    mysql 中sql语句的执行顺序
  • 原文地址:https://www.cnblogs.com/lijiaman/p/8490478.html
Copyright © 2011-2022 走看看