首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 冲浪宝典 > 网络资源 > Oracle9i New Feature Series: Using Multiple Block
【标  题】:Oracle9i New Feature Series: Using Multiple Block
【关键字】:Oracle9i,New,Feature,Series,Using,Multiple,Block
【来  源】:http://www.cublog.cn/u/20140/showart.php?id=196840

Oracle9i New Feature Series: Using Multiple Block

This is one of the most exciting new features for the DBA, especially now a day there are many databases where you can hardly distinguish between OLTP and DSS….

In the pre-9i releases, you define the BLOCK_SIZE when creating the database and it cannot be changed. In 9i also this is true. In addition to the standard block size of the database, you can create tablespaces with different block size. The block size of the tablespace is specified using the BLOCK SIZE clause of CREATE TABLESPACE.

For you to use this feature, you need to set the right buffer cache parameter. The DB_CACHE_SIZE specifies the buffer cache size for the objects in tablespaces created with the standard block size. DB_nK_CACHE_SIZE parameter sets the appropriate buffer cache for the non-standard block sized tablespace. ‘n’ could be 2, 4, 8, 16 or 32 but it should not be equal to your standard block size. The default values for DB_nK_CACHE_SIZE parameters are 0.

SQL> show parameter db%cache
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- -------
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      OFF
db_cache_size                        big integer 0
db_keep_cache_size                   big integer 0
db_recycle_cache_size                big integer 0
SQL> show parameter db_block
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- -------
db_block_buffers                     integer     1500
db_block_checking                    boolean     FALSE
db_block_checksum                    boolean     TRUE
db_block_size                        integer     8192
SQL>

Look at the above parameters; since the database was upgraded from 8i, it is still using the old style buffer cache sizing using DB_BLOCK_BUFFERS. Here we cannot set any of the DB_nK_CACHE_SIZE parameter because you have not used the DB_CACHE_SIZE parameter to start the database.

SQL> alter system set db_4k_cache_size=20;
alter system set db_4k_cache_size=20
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00381: cannot use both new and old parameters for buffer cache size
specification
 
SQL>

Let’s try another database:

SQL> show parameter db%cache
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------
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 83886080
db_keep_cache_size                   big integer 0
db_recycle_cache_size                big integer 0
SQL> show parameter sga
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------
lock_sga                             boolean     FALSE
pre_page_sga                         boolean     FALSE
sga_max_size                         big integer 220163984
SQL>
SQL> alter system set db_cache_size=20m;
 
System altered.
 
SQL> alter system set db_4k_cache_size=2M;
 
System altered.
 
SQL> show parameter db%cache
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- -------------------
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 16777216
db_8k_cache_size                     big integer 0
db_cache_advice                      string      ON
db_cache_size                        big integer 33554432
db_keep_cache_size                   big integer 0
db_recycle_cache_size                big integer 0
SQL>
SQL>
SQL> create tablespace test_biju datafile
  2  '/ora_backup/test_biju.dbf' size 50m
  3  extent management local
  4* blocksize 4k
SQL> /
 
Tablespace created.
 
SQL>
SQL> select block_size from dba_tablespaces
  2  where tablespace_name = 'TEST_BIJU';
 
BLOCK_SIZE
----------
      4096
 
1 row selected.
 
SQL> drop tablespace test_biju including contents and datafiles;
 
Tablespace dropped.
 
SQL>
The Secrets of Oracle Row Chaining and Migration:【上一篇】
Creating tablespaces with multiple block sizes:【下一篇】
【相关文章】
  • 幼学琼林--SpringSide推荐的JDK5.0 feature
  • Using EMC Clone Example
  • Using EMC snapshot example
  • Here are all of the Oracle9i hints on release 9.0.
  • 发行版发布: gNewSense 1.0
  • estimate table size after reorg (using dbms_space)
  • NewsML
  • Liferay在oracle9i上部署
  • EnterPrise应用(4) Security Application Block应用程序块 角色处理(VB.NET)
  • Oracle9i的简化SQL语法
  • 【随机文章】
  • VBS脚本病毒原理分析与防范(2)
  • 创建C++ Builder菜单
  • LtBS - Chapter 9. Debugging shell programs
  • ZOPE3 在cygwin python2.4下的安装
  • VoIP over WiFi开发环境建设
  • 源码公开的TCP/IP协议栈在远程监测中的应用
  • editing
  • C/C++中的函数参数传递机制
  • How To Solve BuG:INIT: Id "X" respawning too fast
  • 06.03.12 软件更新
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.