如果需要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
阅读(2340) | 评论(0) | 转发(1) |