System Partitioning in 11g

SQL> create table test (c1 number,c2 integer)
2 partition by system
3 (partition p1, partition p2,partition p3);
Table created.

SQL> select table_name,partition_name from dba_tab_partitions where table_name='TEST';
TABLE_NAME PARTITION_NAME
----------------------------- ------------------------------
TEST P1
TEST P2
TEST P3

SQL> alter table test merge partitions p1,p2 into partition p;
Table altered.

SQL> select table_name,partition_name from dba_tab_partitions where table_name='TEST';
TABLE_NAME PARTITION_NAME
----------------------------- ------------------------------
TEST P3
TEST P

SQL> alter table test merge partitions p,p3 into partition p;
Table altered.
SQL> select table_name,partition_name from dba_tab_partitions where table_name='TEST';
TABLE_NAME PARTITION_NAME
------------------------------ ------------------------------
TEST P
SQL> insert into test values ('ABC','123');
insert into test values ('ABC','123')
*

ERROR at line 1:
ORA-14701: partition-extended name or bind variable must be used for DMLs on
tables partitioned by the System method

SQL>
 
The big difference between a system-partitioned table and the other types of

partitioned tables is seen during the insertion of data into the partitioned table.
Unlike the traditional partitioned tables, when inserting data into a systempartitioned
table, you must specify the specific partition into which you want to
insert the new data. If you use the normal insert statement for other types of
partitioned tables, it will fail, as shown here:

ORA-14701: partition-extended name or bind variable must be used for DMLs on

tables partitioned by the System method

No comments:

Post a Comment