ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 修改数据库分区表分区名和所属表空间,限于Oracle10g

修改数据库分区表分区名和所属表空间,限于Oracle10g

原创 Linux操作系统 作者:帅帅的动力 时间:2012-06-06 15:12:00 0 删除 编辑
--更改表空间名字
alter tablespace S_GSM_PM_COVER_H_12 rename to S_GSM_PM_COVER_H_2012;
alter tablespace S_GSM_PM_NETSGROUP_H_12 rename to S_GSM_PM_NETSGROUP_H_2012;
alter tablespace S_GSM_PM_BSC_H_12 rename to S_GSM_PM_BSC_H_2012;
alter tablespace S_GSM_PM_BSC_H_11 rename to S_GSM_PM_BSC_H_2011;
alter tablespace S_GSM_PM_COUNTRY_H_12 rename to S_GSM_PM_COUNTRY_H_2012;
alter tablespace S_GSM_PM_COUNTRY_H_11 rename to S_GSM_PM_COUNTRY_H_2011;

--更改分区所属表空间
alter table GSM_PM_COVER_H move partition S_GSM_PM_COVER_H_2012 tablespace S_GSM_PM_COVER_H_2012;
alter table GSM_PM_NETSGROUP_H move partition S_GSM_PM_NETSGROUP_H_2012 tablespace S_GSM_PM_NETSGROUP_H_2012;
alter table GSM_PM_BSC_H move partition S_GSM_PM_BSC_H_2012 tablespace S_GSM_PM_BSC_H_2012;
alter table GSM_PM_BSC_H move partition S_GSM_PM_BSC_H_2011 tablespace S_GSM_PM_BSC_H_2011;
alter table GSM_PM_COUNTRY_H move partition S_GSM_PM_COUNTRY_H_2012 tablespace S_GSM_PM_COUNTRY_H_2012;
alter table GSM_PM_COUNTRY_H move partition S_GSM_PM_COUNTRY_H_2011 tablespace S_GSM_PM_COUNTRY_H_2011;
--更改表分区名字
alter table GSM_PM_COVER_H rename partition S_GSM_PM_COVER_H_2012 to PART_DTM_REPDATE_2012;
alter table GSM_PM_NETSGROUP_H rename partition S_GSM_PM_NETSGROUP_H_2012 to PART_DTM_REPDATE_2012;
alter table GSM_PM_BSC_H rename partition S_GSM_PM_BSC_H_2012 to PART_DTM_REPDATE_2012;
alter table GSM_PM_BSC_H rename partition S_GSM_PM_BSC_H_2011 to PART_DTM_REPDATE_2011;
alter table GSM_PM_COUNTRY_H rename partition S_GSM_PM_COUNTRY_H_2012 to PART_DTM_REPDATE_2012;
alter table GSM_PM_COUNTRY_H rename partition S_GSM_PM_COUNTRY_H_2011 to PART_DTM_REPDATE_2011;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26940217/viewspace-732053/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-05-13

  • 博文量
    17
  • 访问量
    17615