Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1447699
  • 博文数量: 239
  • 博客积分: 5909
  • 博客等级: 大校
  • 技术积分: 2715
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-24 20:19
文章分类

全部博文(239)

文章存档

2014年(4)

2013年(22)

2012年(140)

2011年(14)

2010年(59)

我的朋友

分类: Oracle

2012-01-04 22:29:49

如果需要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
阅读(2342) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~