1. 程式人生 > >『DBA日誌』ORA-14060的解決

『DBA日誌』ORA-14060的解決

SQL> drop table LIST_PAR_TBL;

Table dropped.

SQL> create table LIST_PAR_TBL
  2  (
  3    PARTITION_ID       VARCHAR2(2) not null,
  4    NAME               VARCHAR2(14)
  5  )
  6  partition by list (PARTITION_ID)
  7  ( partition P01 values ('1'),
  8    partition P02 values ('2'),
  9    partition P03 values
('3'),
10    partition P04 values ('4'),
11    partition P05 values ('5'),
12    partition P06 values ('6')
13  );

Table created.

SQL> alter table LIST_PAR_TBL_P01 modify PARTITION_ID varchar2(2);

Table altered.

SQL> alter table LIST_PAR_TBL exchange partition P01 with table  LIST_PAR_TBL_P01;

Table altered.


SQL> select * from LIST_PAR_TBL partition(p01);

PA NAME
-- --------------
1  p1

SQL> select * from LIST_PAR_TBL_P01;

no rows selected

SQL> alter table LIST_PAR_TBL_P02 modify PARTITION_ID varchar2(2);

Table altered.

SQL> alter table LIST_PAR_TBL_P03 modify PARTITION_ID varchar2(2);

Table altered.


SQL> alter table LIST_PAR_TBL_P04 modify PARTITION_ID varchar2(2);

Table altered.

SQL> alter table LIST_PAR_TBL_P05 modify PARTITION_ID varchar2(2);

Table altered.

SQL> alter table LIST_PAR_TBL_P06 modify PARTITION_ID varchar2(2);

Table altered.

SQL> alter table LIST_PAR_TBL exchange partition P02 with table  LIST_PAR_TBL_P02;

Table altered.

SQL> alter table LIST_PAR_TBL exchange partition P03 with table  LIST_PAR_TBL_P03;

Table altered.

SQL> alter table LIST_PAR_TBL exchange partition P04 with table  LIST_PAR_TBL_P04;

Table altered.

SQL> alter table LIST_PAR_TBL exchange partition P05 with table  LIST_PAR_TBL_P05;

Table altered.

SQL> alter table LIST_PAR_TBL exchange partition P06 with table  LIST_PAR_TBL_P06;

Table altered.

SQL> select * from LIST_PAR_TBL;

PA NAME
-- --------------
1  p1
2  p2
3  p3
4  p4
5  p5
6  p6

6 rows selected.

SQL> select * from LIST_PAR_TBL_P06;

no rows selected

SQL> desc LIST_PAR_TBL;
Name                 Null?    Type
-------------------- -------- ------------------
PARTITION_ID         NOT NULL VARCHAR2(2)
NAME                          VARCHAR2(14)

SQL>