1

I need to prepare the script to increase the partition range if the partition is going to get finished in next 2-3 months. How to find the existing table partition and we can edit to existing table or we need to create a new script.

Appreciate response

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
junaid
  • 11
  • 2
  • 1
    Use [Interval-Partition](http://docs.oracle.com/cd/E18283_01/server.112/e16541/part_admin001.htm#BAJHFFBE), then you don't have to take care about any "finish dates". Oracle will automatically add new partitions whenever they are needed. – Wernfried Domscheit Dec 15 '15 at 08:39

1 Answers1

1

How to find the existing table partition

You could either generate the table DDL using DBMS_METADATA package to get the complete table DDL.

Or, query the user_tab_partitions view to get the table partition information.

To add new partitions, you need to use ADD PARTITION clause:

ALTER TABLE   <table_name> 
ADD PARTITION <new_partition> 
VALUES        (<new_value>) 
TABLESPACE    <tablespace_name>;
Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124