分区管理9

end if;
                dbms_output.put_line('7'||vv_add_p_sql);
                /** @description update process flag and deal date*/
                update tb_sys_tab_partitions
                   set proc_flag_id = '2', partition_date = vd_deal_date
                 where upper(owner) = upper(l_table_list.owner)
                   and upper(table_name) = upper(l_table_list.table_name);
                /** partition add and drop success log*/
            dbms_output.put_line('8'||vv_add_p_sql);
            /** @description error occurs during the creation or drop of partition on one table*/
            exception
                when exc_partition_type then
                    rollback;
                    vn_err_code := sqlcode;
                    vv_err_text := l_table_list.table_name||'partition_type error:'||substr(sqlerrm,1,120);
                    vi_log_status := -1;
                    select sysdate into vd_end_date from dual;
                    update tb_sys_tab_partitions
                       set proc_flag_id = 'e'
                     where upper(owner) = upper(l_table_list.owner)
                       and upper(table_name) = upper(l_table_list.table_name);
                    on_statuscode := -1;
            when others then
               rollback;
            vn_err_code := sqlcode;
                    vv_err_text := l_table_list.table_name||':'||substr(sqlerrm,1,120);
            vi_log_status := -1;
            select sysdate into vd_end_date from dual;
                    update tb_sys_tab_partitions
                       set proc_flag_id = 'e'
                     where upper(owner) = upper(l_table_list.owner)
                       and upper(table_name) = upper(l_table_list.table_name);
                    on_statuscode := -1;
            end;
        end loop;
        close c_table_list;

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

转载于:http://blog.itpub.net/12961536/viewspace-1061434/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值