Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1021722
  • 博文数量: 584
  • 博客积分: 2293
  • 博客等级: 大尉
  • 技术积分: 3045
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-28 11:15
文章分类

全部博文(584)

文章存档

2012年(532)

2011年(47)

2009年(5)

我的朋友

分类:

2012-05-18 08:13:45

原文地址:oracle tablespace db_block_size 作者:icybay

如果需要tablespace的block_size和DB的block_size不一致,必须先设置db_nk_cache_size
Specifying Nonstandard Block Sizes for Tablespaces
You can create tablespaces with block sizes different from the standard database block size, which is specified by the DB_BLOCK_SIZE initialization parameter. This feature lets you transport tablespaces with unlike block sizes between databases.

Use the BLOCKSIZE clause of the CREATE TABLESPACE statement to create a tablespace with a block size different from the database standard block size. In order for the BLOCKSIZE clause to succeed, you must have already set the DB_CACHE_SIZE and at least one DB_nK_CACHE_SIZE initialization parameter. Further, and the integer you specify in the BLOCKSIZE clause must correspond with the setting of one DB_nK_CACHE_SIZE parameter setting. Although redundant, specifying a BLOCKSIZE equal to the standard block size, as specified by the DB_BLOCK_SIZE initialization parameter, is allowed.

SQL> alter system set db_2k_cache_size=1024k;

System altered.

SQL> alter system set db_16k_cache_size=1024k;

System altered.

SQL> alter system set db_8k_cache_size=1024k;

System altered.

SQL> CREATE TABLESPACE tbs_test_2k
  2                    DATAFILE 'C:\ORACLE\ORADATA\TEST\tbs_test_2k_01.dbf' SIZE 10M
  3                    EXTENT MANAGEMENT LOCAL
  4                    UNIFORM SIZE 256K
  5                    blocksize 2k;

Tablespace created.

SQL> CREATE TABLESPACE tbs_test_8k
  2                    DATAFILE 'C:\ORACLE\ORADATA\TEST\tbs_test_8k_01.dbf' SIZE 10M
  3                    EXTENT MANAGEMENT LOCAL
  4                    UNIFORM SIZE 256K
  5                    blocksize 8k;

Tablespace created.

SQL> CREATE TABLESPACE tbs_test_16k
  2                    DATAFILE 'C:\ORACLE\ORADATA\TEST\tbs_test_16k_01.dbf' SIZE 10M
  3                    EXTENT MANAGEMENT LOCAL
  4                    UNIFORM SIZE 256K
  5                    blocksize 16k;

Tablespace created.

drop tablespace test including contents and datafiles;
alter system switch logfile;
select name from v$datafile;
select * from v$tablespace;

alter system switch logfile; 解释详见
www.cnblogs.com/quange/archive/2010/05/14/1735611.html
blog.sina.com.cn/s/blog_5904ea280100eilw.html
阅读(542) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~