Previous Topic: Add a Series of Partitions Using DatesNext Topic: Specify the Tablespace for Individual Objects


Add a Specific Partition

To add a specific partition, you must execute the wgn_add_partition procedure as the schema owner. The prototype is:

wgn_add_partition(
  date_range IN VARCHAR2
  db_type IN NUMBER 
  );

Where:

date_range

Specifies the end date for the new partition.

By default, the date format must be dd-mmm-yyyy (for example, 08-mar-2011).

db_type

Specifies the database that you want to partition:

wgn_partition_util.wgn_db_type_CMS

(Default) Specifies the CMS database tables.

wgn_partition_util.wgn_db_type_DW

Specifies the data warehouse tables.

wgn_partition_util.wgn_db_type_BOTH

Specifies both databases. That is, you want to partition tables in the CMS database and the data warehouse.

Examples

A database is segmented into partitions 30 days long. If the latest existing partition has an end date of March 7, this command adds a new partition to store events with capture dates between March 8 and April 6:

SQL> EXEC wgn_partition_util.wgn_add_partition ( 
  date_range =>'06-apr-2011', 
  db_type => Wgn_Partition_Util.wgn_db_type_CMS 
  ); 

This command adds the same partition for the data warehouse:

SQL> EXEC wgn_partition_util.wgn_add_partition ( 
  date_range =>'06-apr-2011', 
  db_type => Wgn_Partition_Util.wgn_db_type_DW 
  );