How To Know If Partition Feature Is Installed

In Oracle to see if this partitioning option is installed you must run the following query, but returns zero rows is not installed.

select * from v$option where parameter = ‘Partitioning’ and value =’TRUE’;

 
Apart ought to be in a version Enterprise, this can be seen with this sentence;

select * from v$version where rownum <= 1 and banner like ‘%Enterprise%’;

 
If the above queries returns rows, a final test is to create a table with partitioning, as the following example;

 

 CREATE TABLE TAB1
(
 col1     NOT NULL,
 col2     DATE NOT NULL
)
PARTITION BY RANGE (col2)
(
 PARTITION quarter_1 VALUES LESS THAN (TO_DATE('01/04/2014', 'DD/MM/YYYY')) TABLESPACE work,
 PARTITION quarter_2 VALUES LESS THAN (TO_DATE('01/07/2014', 'DD/MM/YYYY')) TABLESPACE work,
 PARTITION quarter_3 VALUES LESS THAN (TO_DATE('01/09/2014', 'DD/MM/YYYY')) TABLESPACE work,
 PARTITION quarter_4 VALUES LESS THAN (TO_DATE('01/01/2014', 'DD/MM/YYYY')) TABLESPACE work
)
/

 

If you have not installed this feature, when creating the table you will return the following error;

ERROR at line 1:
ORA-00439: feature not enabled: Partitioning

 

HTH – Antonio NAVARRO

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s