?
Solved

add another partiton to existing partition table in oracle

Posted on 2008-06-17
5
Medium Priority
?
671 Views
Last Modified: 2013-12-27
Experts,

i have a stupid question. i am new to table partitions. i have a table called AA which is partitioned by range based on date. now i need add 2 more partitions to existing table AA. how do i add /create 2 more partitions to the existing partition table.
PARTITION ATN_1206 VALUES LESS THAN (TO_DATE(' 2007-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    LOGGING
    NOCOMPRESS
    TABLESPACE TXN_DATA2
    PCTUSED    40
    PCTFREE    10
    INITRANS   12
    MAXTRANS   255
    STORAGE    (
                INITIAL          16K
                NEXT             32M
                MINEXTENTS       1
                MAXEXTENTS       1000000
                PCTINCREASE      0
                FREELISTS        12
                FREELIST GROUPS  1
                BUFFER_POOL      DEFAULT
               ),  
 
this is the last partition i have. now i need to create 2 more partitons like ATN_0107 ,ATN_0207 like this.
how do i add new partitions.

Open in new window

0
Comment
Question by:pavan27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 21806556
ALTER TABLE AA
 ADD
  PARTITION ATN_0107 VALUES LESS THAN (TO_DATE(' 2007-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    LOGGING
    NOCOMPRESS;

ALTER TABLE AA
 ADD
  PARTITION ATN_0207 VALUES LESS THAN (TO_DATE(' 2007-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    LOGGING
    NOCOMPRESS;
0
 
LVL 1

Author Comment

by:pavan27
ID: 21806637
Hai,

Thanks for response. i am getting this error. how do i fix this error

ERROR at line 1:
ORA-14074: partition bound must collate higher than that of the last partition
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 21806736
you must have other partitions in your table that have upper bounds higher than what you've shown above.

Can you post your entire "create table" for the table as it is now?
0
 
LVL 1

Author Comment

by:pavan27
ID: 21806776
please find the attachment. could you please let me know where i am doing wrong.
now could you pelase send me script to create partitions
cr8-tab-partiton.txt
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 21807656
you have a MAXVALUE partition.    So rather than adding new partitions to the end,  you will need to split the final partition into new segements.


alter table txn split partition txn_max at (to_date('2007-02-01','yyyy-mm-dd')) into (partition txn_0107, partition txn_max) update global indexes;

alter table txn split partition txn_max at (to_date('2007-03-01','yyyy-mm-dd')) into (partition txn_0207, partition txn_max) update global indexes;
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses
Course of the Month10 days, 17 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question