网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Oracle11G在线重定义

create tablespace tbs1 datafile '/opt/oracle/oradata/haier/tbs1.dbf' size 500m autoextend on maxsize 2G;

在北仑等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都网站建设、网站设计 网站设计制作按需定制开发,公司网站建设,企业网站建设,成都品牌网站建设,全网整合营销推广,成都外贸网站建设,北仑网站建设费用合理。

 

create tablespace tbs2 datafile '/opt/oracle/oradata/haier/tbs2.dbf' size 500m autoextend on maxsize 2G;

create tablespace tbs3 datafile '/opt/oracle/oradata/haier/tbs3.dbf' size 500m autoextend on maxsize 2G;

SQL> desc HHHH
 Name        Null?    Type
 ----------------------------------------- -------- ----------------------------
 PNTMALL_PNT_ID         NUMBER
 PNTMALL_PNT_DT         DATE
.......
 PNTMALL_HRTYPE_DESC        VARCHAR2(2000)

SQL> selectcount(*) from HHHH;

 

  COUNT(*)

----------

  16713034

alter table HHHH add constraint HHHH_PKEY primary key(PNTMALL_PNT_ID);

create table HHHH_tmp

partition by range(PNTMALL_PNT_DT)

(

partition p1 values less than (to_date('2016-01-01','yyyy-mm-dd')) tablespace tbs1,

partition p2 values less than (to_date('2017-01-01','yyyy-mm-dd')) tablespace tbs2,

partition p3 values less than (maxvalue) tablespace tbs3

)

as

select * from HHHH where 1=2;

SQL> begin

  2 DBMS_REDEFINITION.START_REDEF_TABLE('BER','HHHH','HHHH_TMP');

  3  end;

  4  /

 

PL/SQL proceduresuccessfully completed

 

SQL> selectobject_id,object_name,object_type,status from user_objects where object_namelike '%HHH%';

 

 OBJECT_ID OBJECT_NAME                                                                     OBJECT_TYPE         STATUS

------------------------------------------------------------------------------------------------------------- -------

    115233 HHHH_PKEY                                                                       INDEX               VALID

    115232 HHHH                                                                            TABLE               VALID

    115341 HHHH_TMP                                                                        TABLE PARTITION     VALID

    115340 HHHH_TMP                                                                        TABLE PARTITION     VALID

    115339 HHHH_TMP                                                                        TABLE PARTITION     VALID

    115338 HHHH_TMP                                                                        TABLE               VALID

    115342 MLOG$_HHHH                                                                      TABLE               VALID

    115343 RUPD$_HHHH

SQL> selectcount(*) from HHHH;

 

  COUNT(*)

----------

  16713034

 

SQL> selectcount(*) from HHHH_TMP;

 

  COUNT(*)

----------

  16713034

SQL> exec DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS('BER','HHHH','HHHH_TMP',NUM_ERRORS => :V_ERR);

 

 

PL/SQL procedure successfully completed.

SQL> print v_err

 

     V_ERR

----------

 0

SQL> selectobject_id,object_name,object_type,status from user_objects where object_namelike '%HHH%';

 

 OBJECT_ID OBJECT_NAME                                                                     OBJECT_TYPE         STATUS

------------------------------------------------------------------------------------------------------------- -------

    115344 TMP$$_HHHH_PKEY0                                                                INDEX               VALID

    115343 RUPD$_HHHH                                                                      TABLE               VALID

    115342 MLOG$_HHHH                                                                      TABLE               VALID

    115338 HHHH_TMP                                                                        TABLE               VALID

    115339 HHHH_TMP                                                                        TABLE PARTITION     VALID

    115340 HHHH_TMP                                                                        TABLE PARTITION     VALID

    115341 HHHH_TMP                                                                        TABLE PARTITION     VALID

    115232 HHHH                                                                            TABLE               VALID

    115233 HHHH_PKEY                                                                       INDEX               VALID

 

9 rows selected

SQL> selecttable_name,index_name,status from user_indexes where table_name='HHHH_TMP';

 

TABLE_NAME                     INDEX_NAME                     STATUS

------------------------------------------------------------ --------

HHHH_TMP                       TMP$$_HHHH_PKEY0               VALID

SQL> EXECDBMS_REDEFINITION.SYNC_INTERIM_TABLE('BER','HHHH','HHHH_TMP');

 

PL/SQL proceduresuccessfully completed

SQL> selectobject_id,object_name,object_type,status from user_objects where object_namelike '%HHH%';

 

 OBJECT_ID OBJECT_NAME                                                                     OBJECT_TYPE         STATUS

------------------------------------------------------------------------------------------------------------- -------

    115338 HHHH                                                                            TABLE               VALID

    115339 HHHH                                                                            TABLE PARTITION     VALID

    115340 HHHH                                                                            TABLE PARTITION     VALID

    115341 HHHH                                                                            TABLE PARTITION     VALID

    115232 HHHH_TMP                                                                        TABLE               VALID

    115344 HHHH_PKEY                                                                       INDEX               VALID

    115233 TMP$$_HHHH_PKEY0                                                                INDEX               VALID

 

7 rows selected


网站标题:Oracle11G在线重定义
网站地址:http://bjjierui.cn/article/ihdcpi.html

其他资讯