在 Oracle PL/SQL 中使用 ONLINE 将非分区表转换为分区表 [英] Convert Non-partition table to partitioned table using ONLINE in Oracle PL/SQL
本文介绍了在 Oracle PL/SQL 中使用 ONLINE 将非分区表转换为分区表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道我们无法将现有的非分区表转换为分区表,但来自 Oracle 的以下链接建议在ONLINE"关键字的帮助下我们可以做到.
I got to know as we cannot convert existing non-partitioned table to partitioned table but the below link from the Oracle suggest that with the help of "ONLINE" keyword we can do it.
CREATE TABLE my_tab ( a NUMBER(38,0), b NUMBER(38,0));
ALTER TABLE MY_TAB MODIFY PARTITION BY RANGE (a) INTERVAL (1000) (
PARTITION p1 VALUES LESS THAN (1000)) ONLINE;
但它对我不起作用,抛出错误为无效的分区名称".
But it's not working for me, throwing error as "Invalid Partition Name".
我不想使用dbms_redefinition
.
推荐答案
如果您使用的是 Oracle 12c Release 2
,您可以使用单个 ALTER
来转换非分区表分区一:
If you are using Oracle 12c Release 2
you could use single ALTER
to convert non-partitioned table to partitioned one :
CREATE TABLE my_tab ( a NUMBER(38,0), b NUMBER(38,0));
ALTER TABLE MY_TAB MODIFY PARTITION BY RANGE (a) INTERVAL (1000) (
PARTITION p1 VALUES LESS THAN (1000)) ONLINE;
这篇关于在 Oracle PL/SQL 中使用 ONLINE 将非分区表转换为分区表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文