db2创建索引指定索引空间 Oracle表、索引修改表空间语句
Oracle表、索引修改表空间语句
表做空间迁移时 使用如下语句
例 alter table tb_name move tablespace tbs_name;
索引表空间做迁移 使用如下语句

例 alter index index_name rebuild tablespace tbs_name;
对于含有lob字段的表 在建立时 oracle会自动为lob字段建立两个单独的segment 一个用来存放数据 另一个用来存放索引 并且它们都会存储在对应表指定的表空间中 而例 只能移动非lob字段以外的数据 所以在对含有lob字段的表进行空间迁移 需要使用如下语句
例 alter table tb_name move tablespace tbs_name lob (col_lob col_lob ) store as(tablesapce tbs_name);
项目实例
表空间迁移
select alter table ||table_name|| move tablespace tbs_name; table_name from dba_tables where owner= %***% and table_name like %***%
带lob字段
select alter table ||table_name|| move lob( ||index_name|| ) store as (tablespace tbs_name); from dba_indexes where owner= %***% and index_name like %***%
索引表空间
select alter index ||index_name|| rebuild tablespace tbs_name; index_name from dba_indexes where owner= %***% and table_name like %***%
lishixinzhi/Article/program/Oracle/201311/18067相关文章
- oracle数据库增加一个字段 oracle数据库的一个表中怎么设置字段的默认值
- 有位图索引的字段怎么修改 Oracle 的位图索引
- 有位图索引的字段怎么修改 Oracle位图索引(BitmapIndex)
- 数据库中索引的设计方案 设计资料库中的索引有什么作用
- 查看数据库中表索引情况 Oracle数据库中索引的维护
- 什么字段适合建索引 在OracleE数据库的字段上建立索引的方法
- oracle新增数据语句 oracle构造添加字段的SQL语句
- oracle分区表添加子分区 建立了分区表后如果访问表中数据
- oracle用户指定多个表空间 oracle将数据导入指定表空间
- 查看数据库表空间使用情况 更改Oracle数据库表的表空间
爱学记

微信收款码
支付宝收款码