Вы находитесь на странице: 1из 4

sql>

sql>
sql> ----------- merge partition
sql>
sql>
sql>
sql>
sql> alter table part merge partitions p1,p3 into partition p2;

table altered.

sql> select * from part partition(p1);


select * from part partition(p1)
*
error at line 1:
ora-02149: specified partition does not exist

sql> select
2 * from part;

sno name
---------- ----------
1 sa
2 dg
76 hgj

sql> select * from part partition(p3);


select * from part partition(p3)
*
error at line 1:
ora-02149: specified partition does not exist

sql> select * from part partition(p2);

sno name
---------- ----------
1 sa
2 dg
76 hgj

sql> ------------ the merged partition will be delete


sql>
sql>
sql> ------ p1 and p2 are merged to p3.
sql>
sql>
sql> ------ the p1 and p2 to get deleted.
sql>
sql> -------------------split partition
sql>
sql>
sql> select partition_name,high_value from user_tab_partition where
table_name='part';
select partition_name,high_value from user_tab_partition where table_name='part'
*
error at line 1:
ora-00942: table or view does not exist

sql> select partition_name,high_value from user_tab_partitions where


table_name='part';

partition_name
------------------------------
high_value
--------------------------------------------------------------------------------
p2
100

sql>
sql> alter table part spilt partition p4 at (160) into (partition p41,partition
p42);
alter table part spilt partition p4 at (160) into (partition p41,partition p42)
*
error at line 1:
ora-01735: invalid alter table option

sql> ed
wrote file afiedt.buf

1* alter table part spilt partition p4 at (160) into (partition p41,partition


p42)
sql>
sql> ed
wrote file afiedt.buf

1* alter table part split partition p4 at (160) into (partition p41,partition


p42)
sql> /
alter table part split partition p4 at (160) into (partition p41,partition p42)
*
error at line 1:
ora-02149: specified partition does not exist

sql> ed
wrote file afiedt.buf

1* alter table part split partition p3 at (160) into (partition p41,partition


p42)
sql> /
alter table part split partition p3 at (160) into (partition p41,partition p42)
*
error at line 1:
ora-02149: specified partition does not exist

sql> ed
wrote file afiedt.buf

1* alter table part split partition p2 at (160) into (partition p41,partition


p42)
sql> /
alter table part split partition p2 at (160) into (partition p41,partition p42)
*
error at line 1:
ora-14080: partition cannot be split along the specified high bound

sql> ed
wrote file afiedt.buf

1* alter table part split partition p2 at (60) into (partition p41,partition


p42)
sql> /

table altered.

sql> select * from part partition(p41);

sno name
---------- ----------
1 sa
2 dg

sql> select * from part partition(p42);

sno name
---------- ----------
76 hgj

sql>
sql> select object_id from dba_objects from object_name='part';
select object_id from dba_objects from object_name='part'
*
error at line 1:
ora-00933: sql command not properly ended

sql> select object_id from dba_objects where object_name='part';


select object_id from dba_objects where object_name='part'
*
error at line 1:
ora-00942: table or view does not exist

sql> select object_id from dba_object where object_name='part';


select object_id from dba_object where object_name='part'
*
error at line 1:
ora-00942: table or view does not exist

sql> desc dba_objects


error:
ora-04043: object "sys"."dba_objects" does not exist

sql> ----------- it should work on as sys user...


sql> ------------ now it is in scott user
sql> spool off

Вам также может понравиться