hxl 发表于 2011-12-22 08:54

使用dbms_redefinition普通表重定义分区表遇到的问题

<DIV>在使用dbms_redefinition将普通表转换为分区表的时候,若转换过程中创建中间表的DDL太长,Oracle会截取掉部分DDL,这个问题在11.2.0.2版本已经修复,以下是在11.2.0.1下测试的。</DIV>
<DIV>测试如下:</DIV>
<DIV>测试Oracle版本:</DIV>
<DIV>
<DIV id=codeText class=codeText>
<OL style="PADDING-BOTTOM: 5px; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px" class=dp-css>
<LI><SPAN style="COLOR: #000000">SQL<SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #0000ff">select</SPAN> <SPAN style="COLOR: #0000cc">*</SPAN> <SPAN style="COLOR: #0000ff">from</SPAN> v$version<SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><BR></LI>
<LI>BANNER<BR></LI>
<LI><SPAN style="COLOR: #ff9900">--------------------------------------------------------------------------------<BR></LI>
<LI></SPAN><BR></LI>
<LI>Oracle <SPAN style="COLOR: #0000ff">Database</SPAN> 11g Enterprise Edition <SPAN style="COLOR: #ff0000">Release</SPAN> 11<SPAN style="COLOR: #0000cc">.</SPAN>2<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>1<SPAN style="COLOR: #0000cc">.</SPAN>0 <SPAN style="COLOR: #0000cc">-</SPAN> Production<BR></LI>
<LI>PL<SPAN style="COLOR: #0000cc">/</SPAN>SQL <SPAN style="COLOR: #ff0000">Release</SPAN> 11<SPAN style="COLOR: #0000cc">.</SPAN>2<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>1<SPAN style="COLOR: #0000cc">.</SPAN>0 <SPAN style="COLOR: #0000cc">-</SPAN> Production<BR></LI>
<LI>CORE 11<SPAN style="COLOR: #0000cc">.</SPAN>2<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>1<SPAN style="COLOR: #0000cc">.</SPAN>0 Production<BR></LI>
<LI>TNS <SPAN style="COLOR: #0000ff">for</SPAN> 32<SPAN style="COLOR: #0000cc">-</SPAN>bit Windows<SPAN style="COLOR: #0000cc">:</SPAN> Version 11<SPAN style="COLOR: #0000cc">.</SPAN>2<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>1<SPAN style="COLOR: #0000cc">.</SPAN>0 <SPAN style="COLOR: #0000cc">-</SPAN> Production<BR></LI>
<LI>NLSRTL Version 11<SPAN style="COLOR: #0000cc">.</SPAN>2<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>1<SPAN style="COLOR: #0000cc">.</SPAN>0 <SPAN style="COLOR: #0000cc">-</SPAN> Production</SPAN></LI></OL></DIV></DIV>
<DIV>1.创建需要重定义的表</DIV>
<DIV>
<DIV id=codeText class=codeText>
<OL style="PADDING-BOTTOM: 5px; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px" class=dp-css>
<LI><SPAN style="COLOR: #000000"><SPAN style="COLOR: #0000ff">create</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER<BR></LI>
<LI><SPAN style="COLOR: #0000cc">(</SPAN><BR></LI>
<LI>&nbsp;&nbsp;STATEDATE <SPAN style="COLOR: #0000ff">DATE</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;USERNUMBER <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>13<SPAN style="COLOR: #0000cc">)</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;PROVCODE <SPAN style="COLOR: #0000ff">NUMBER</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM1 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM2 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN> <SPAN style="COLOR: #0000ff">default</SPAN> <SPAN style="COLOR: #ff00ff">'A'</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM3 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM4 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM5 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM6 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM7 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM8 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM9 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM10 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;CREATE_DATE <SPAN style="COLOR: #0000ff">DATE</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;CREATE_BY <SPAN style="COLOR: #0000ff">NUMBER</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;LAST_UPDATE_DATE <SPAN style="COLOR: #0000ff">DATE</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;LAST_UPDATE_BY <SPAN style="COLOR: #0000ff">NUMBER</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><BR></LI>
<LI><SPAN style="COLOR: #0000ff">create</SPAN> <SPAN style="COLOR: #0000ff">unique</SPAN> <SPAN style="COLOR: #0000ff">index</SPAN> IDX_TB_HXL_USER_U1 <SPAN style="COLOR: #0000ff">on</SPAN> TB_HXL_USER <SPAN style="COLOR: #0000cc">(</SPAN>STATEDATE<SPAN style="COLOR: #0000cc">,</SPAN> USERNUMBER<SPAN style="COLOR: #0000cc">,</SPAN> PROVCODE<SPAN style="COLOR: #0000cc">)</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000cc">;</SPAN></SPAN></LI></OL></DIV></DIV>
<P>2.创建中间表</P>
<P>中间表目前是33个分区</P>
<DIV id=codeText class=codeText>
<OL style="PADDING-BOTTOM: 5px; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px" class=dp-css>
<LI><SPAN style="COLOR: #000000"><SPAN style="COLOR: #ff9900">-- Create table<BR></LI>
<LI></SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">create</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> tb_hxl_user_mid<BR></LI>
<LI><SPAN style="COLOR: #0000cc">(</SPAN><BR></LI>
<LI>&nbsp;&nbsp;STATEDATE <SPAN style="COLOR: #0000ff">DATE</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;USERNUMBER <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>13<SPAN style="COLOR: #0000cc">)</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;PROVCODE <SPAN style="COLOR: #0000ff">NUMBER</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM1 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM2 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN> <SPAN style="COLOR: #0000ff">default</SPAN> <SPAN style="COLOR: #ff00ff">'A'</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM3 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM4 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM5 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM6 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM7 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM8 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM9 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;REM10 <SPAN style="COLOR: #0000ff">VARCHAR2</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>100<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;CREATE_DATE <SPAN style="COLOR: #0000ff">DATE</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;CREATE_BY <SPAN style="COLOR: #0000ff">NUMBER</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;LAST_UPDATE_DATE <SPAN style="COLOR: #0000ff">DATE</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;LAST_UPDATE_BY <SPAN style="COLOR: #0000ff">NUMBER</SPAN> <SPAN style="COLOR: #0000ff">not</SPAN> <SPAN style="COLOR: #0000ff">null</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000cc">)</SPAN><BR></LI>
<LI>PARTITION <SPAN style="COLOR: #0000ff">BY</SPAN> RANGE <SPAN style="COLOR: #0000cc">(</SPAN>STATEDATE<SPAN style="COLOR: #0000cc">)</SPAN> SUBPARTITION <SPAN style="COLOR: #0000ff">BY</SPAN> <SPAN style="COLOR: #ff0000">list</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>PROVCODE<SPAN style="COLOR: #0000cc">)</SPAN><BR></LI>
<LI>SUBPARTITION TEMPLATE<BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #0000cc">(</SPAN>SUBPARTITION p_01 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>01<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_02 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>02<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_03 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>03<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_04 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>04<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_05 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>05<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_06 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>06<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_07 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>07<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_08 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>08<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_09 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>09<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_10 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>10<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_11 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>11<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_12 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>12<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_13 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>13<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_14 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>14<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_15 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>15<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_16 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>16<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_17 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>17<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_18 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>18<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_19 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>19<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_20 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>20<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_21 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>21<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_22 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>22<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_23 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>23<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_24 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>24<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_25 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>25<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_26 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>26<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_27 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>27<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_28 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>28<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_29 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>29<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUBPARTITION p_30 <SPAN style="COLOR: #0000ff">values</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>30<SPAN style="COLOR: #0000cc">)</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #0000cc">)</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #0000cc">(</SPAN>PARTITION p_20110515 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110516'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><BR></LI>
<LI><SPAN style="COLOR: #ff9900">-- Create/Recreate indexes <BR></LI>
<LI></SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">create</SPAN> <SPAN style="COLOR: #0000ff">unique</SPAN> <SPAN style="COLOR: #0000ff">index</SPAN> IDX_TB_HXL_USER_MID_U1 <BR></LI>
<LI><SPAN style="COLOR: #0000ff">on</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000cc">(</SPAN>STATEDATE<SPAN style="COLOR: #0000cc">,</SPAN> USERNUMBER<SPAN style="COLOR: #0000cc">,</SPAN> PROVCODE<SPAN style="COLOR: #0000cc">)</SPAN> local<SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110516 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110517'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110517 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110518'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110518 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110519'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110519 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110520'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110520 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110521'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110521 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110522'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110522 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110523'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110523 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110524'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110524 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110525'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110525 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110526'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110526 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110527'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110527 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110528'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110528 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110529'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110529 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110530'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110530 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110531'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110531 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110601'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110601 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110602'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110602 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110603'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110603 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110604'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110604 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110605'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110605 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110606'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110606 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110607'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110607 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110608'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110608 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110609'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110609 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110610'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110610 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110611'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110611 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110612'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110612 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110613'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110613 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110614'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110614 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110615'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110615 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110616'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110616 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110617'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN></SPAN></LI></OL></DIV>
<P>3.执行重定义</P>
<DIV id=codeText class=codeText>
<OL style="PADDING-BOTTOM: 5px; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px" class=dp-css>
<LI><SPAN style="COLOR: #000000">SQL<SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #0000ff">Begin</SPAN><BR></LI>
<LI>&nbsp;&nbsp;2 dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>can_redef_table<SPAN style="COLOR: #0000cc">(</SPAN>uname <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'HXL'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;3 tname <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #ff00ff">'TB_HXL_USER'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;4 options_flag <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>cons_use_rowid<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;5 <SPAN style="COLOR: #0000ff">End</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;6 <SPAN style="COLOR: #0000cc">/</SPAN><BR></LI>
<LI><BR></LI>
<LI>PL<SPAN style="COLOR: #0000cc">/</SPAN>SQL procedure successfully completed<SPAN style="COLOR: #0000cc">.</SPAN><BR></LI>
<LI><BR></LI>
<LI>SQL<SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #0000ff">Begin</SPAN><BR></LI>
<LI>&nbsp;&nbsp;2 dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>start_redef_table<SPAN style="COLOR: #0000cc">(</SPAN>uname <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #ff00ff">'HXL'</SPAN> <SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;3 orig_table <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'TB_HXL_USER'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;4 int_table <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'TB_HXL_USER_MID'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;5 options_flag <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>cons_use_rowid<BR></LI>
<LI>&nbsp;&nbsp;6 <SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;7 <SPAN style="COLOR: #0000ff">End</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;8 <SPAN style="COLOR: #0000cc">/</SPAN><BR></LI>
<LI><BR></LI>
<LI>PL<SPAN style="COLOR: #0000cc">/</SPAN>SQL procedure successfully completed<SPAN style="COLOR: #0000cc">.</SPAN></SPAN></LI></OL></DIV>
<P>4.中断重定义后</P>
<P>步骤3执行成功,说明目前该表能执行重定义,现在中断重定义,在中间表新增分区后再重定义。</P>
<DIV id=codeText class=codeText>
<OL style="PADDING-BOTTOM: 5px; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px" class=dp-css>
<LI><SPAN style="COLOR: #000000">SQL<SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #0000ff">Begin</SPAN><BR></LI>
<LI>&nbsp;&nbsp;2 dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>abort_redef_table<SPAN style="COLOR: #0000cc">(</SPAN>uname <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #ff00ff">'HXL'</SPAN><BR></LI>
<LI>&nbsp;&nbsp;3 <SPAN style="COLOR: #0000cc">,</SPAN>orig_table <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'TB_HXL_USER'</SPAN><BR></LI>
<LI>&nbsp;&nbsp;4 <SPAN style="COLOR: #0000cc">,</SPAN>int_table <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'TB_HXL_USER_MID'</SPAN><BR></LI>
<LI>&nbsp;&nbsp;5 <SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;6 <SPAN style="COLOR: #0000ff">End</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;<BR></LI>
<LI>PL<SPAN style="COLOR: #0000cc">/</SPAN>SQL procedure successfully completed<SPAN style="COLOR: #0000cc">.</SPAN></SPAN></LI></OL></DIV>
<P>新增14个分区</P>
<DIV id=codeText class=codeText>
<OL style="PADDING-BOTTOM: 5px; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px" class=dp-css>
<LI><SPAN style="COLOR: #000000"><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110617 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110618'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110618 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110619'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110619 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110620'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110620 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110621'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110621 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110622'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110622 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110623'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110623 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110624'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110624 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110625'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110625 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110626'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110626 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110627'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110627 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110628'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110628 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110629'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110629 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110630'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">alter</SPAN> <SPAN style="COLOR: #0000ff">table</SPAN> TB_HXL_USER_MID <SPAN style="COLOR: #0000ff">add</SPAN> partition p_20110630 <SPAN style="COLOR: #0000ff">VALUES</SPAN> LESS THAN <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">to_date</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">'20110701'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #ff00ff">'YYYYMMDD'</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN></SPAN></LI></OL></DIV>
<P>5.新增分区后再次重定义</P>
<P>这个时候过程抛出了异常,这个是因为创建中间表的DDL的SQL太长了,oracle截掉了一部分后导致的。该问题在11.2.0.2.上已经修复。</P>
<DIV id=codeText class=codeText>
<OL style="PADDING-BOTTOM: 5px; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px" class=dp-css>
<LI><SPAN style="COLOR: #000000">SQL<SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #0000ff">Begin</SPAN><BR></LI>
<LI>&nbsp;&nbsp;2 dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>can_redef_table<SPAN style="COLOR: #0000cc">(</SPAN>uname <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'HXL'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;3 tname <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #ff00ff">'TB_HXL_USER'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;4 options_flag <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>cons_use_rowid<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;5 <SPAN style="COLOR: #0000ff">End</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;6 <SPAN style="COLOR: #0000cc">/</SPAN><BR></LI>
<LI><BR></LI>
<LI>PL<SPAN style="COLOR: #0000cc">/</SPAN>SQL procedure successfully completed<SPAN style="COLOR: #0000cc">.</SPAN><BR></LI>
<LI><BR></LI>
<LI>SQL<SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #0000ff">Begin</SPAN><BR></LI>
<LI>&nbsp;&nbsp;2 dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>start_redef_table<SPAN style="COLOR: #0000cc">(</SPAN>uname <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #ff00ff">'HXL'</SPAN> <SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;3 orig_table <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'TB_HXL_USER'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;4 int_table <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'TB_HXL_USER_MID'</SPAN><SPAN style="COLOR: #0000cc">,</SPAN><BR></LI>
<LI>&nbsp;&nbsp;5 options_flag <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> dbms_redefinition<SPAN style="COLOR: #0000cc">.</SPAN>cons_use_rowid<BR></LI>
<LI>&nbsp;&nbsp;6 <SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;7 <SPAN style="COLOR: #0000ff">End</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;8 <SPAN style="COLOR: #0000cc">/</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000ff">Begin</SPAN><BR></LI>
<LI><SPAN style="COLOR: #0000cc">*</SPAN><BR></LI>
<LI>ERROR at line 1<SPAN style="COLOR: #0000cc">:</SPAN><BR></LI>
<LI>ORA<SPAN style="COLOR: #0000cc">-</SPAN>00907<SPAN style="COLOR: #0000cc">:</SPAN> missing <SPAN style="COLOR: #ff0000">right</SPAN> parenthesis<BR></LI>
<LI>ORA<SPAN style="COLOR: #0000cc">-</SPAN>06512<SPAN style="COLOR: #0000cc">:</SPAN> at <SPAN style="COLOR: #ff00ff">"SYS.DBMS_REDEFINITION"</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> line 52<BR></LI>
<LI>ORA<SPAN style="COLOR: #0000cc">-</SPAN>06512<SPAN style="COLOR: #0000cc">:</SPAN> at <SPAN style="COLOR: #ff00ff">"SYS.DBMS_REDEFINITION"</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> line 1646<BR></LI>
<LI>ORA<SPAN style="COLOR: #0000cc">-</SPAN>06512<SPAN style="COLOR: #0000cc">:</SPAN> at line 2</SPAN></LI></OL></DIV>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
页: [1]
查看完整版本: 使用dbms_redefinition普通表重定义分区表遇到的问题