分区表更改默认表空间及移动现有分区到指定表空间
2016-12-22 11:48
441 查看
1、修改分区表的默认表空间:
select 'alter table '||table_name||' modify default attributes tablespace TSDAT01' from dba_tables where table_name in ('T');
查询出的语句直接执行
2、移动现有分区到其他表空间
begin
for x in(select TABLE_OWNER,table_name,partition_name from dba_tab_partitions where table_name in ('T'))
loop
execute immediate 'alter table '||x.table_owner||'.'||x.table_name||' move partition ' || x.partition_name || ' tablespace users';
end loop;
end;
/
select 'alter table '||table_name||' modify default attributes tablespace TSDAT01' from dba_tables where table_name in ('T');
查询出的语句直接执行
2、移动现有分区到其他表空间
begin
for x in(select TABLE_OWNER,table_name,partition_name from dba_tab_partitions where table_name in ('T'))
loop
execute immediate 'alter table '||x.table_owner||'.'||x.table_name||' move partition ' || x.partition_name || ' tablespace users';
end loop;
end;
/
相关文章推荐
- 移动分区表和分区索引的表空间
- 移动分区表和分区索引的表空间
- 移动分区表和分区索引的表空间
- imp指定默认表空间
- Eclipse默认空间与工作空间的更改
- myeclipse更改默认工作空间
- vue如何更改默认端口号8080为指定端口
- Ambari集群移动现有复制到另外地方或更改ip地址,导致各项服务组件上为黄色问号代表心跳丢失的解决方案(图文详解)(博主推荐)
- myeclipse更改默认工作空间
- ORACLE创建表空间、创建用户、更改用户默认表空间以及授权、查看权限
- 如何更改Visual Studio 2008中类文件引用的默认名称空间?
- 分区表空间管理:历史分区压缩,当前分区非压缩
- Sql 2008 : 数据库分文件组(指定磁盘), 映射分区表使用不同的文件组详解(阻止保存要求重新创建表的更改?)
- 更改myeclipse默认工作空间
- 更改eclipse默认空间
- 更改加入域的计算机默认到指定的OU
- 移动 表、表分区、LOB字段、索引、分区索引 到另一表空间!
- Oracle创建一个表 如果不指定表空间 是不是就是用默认的system表空间
- 如何更改Visual Studio 2008中类文件引用的默认名称空间?
- 如何更改Visual Studio 2008中类文件引用的默认名称空间?