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

 

Leave a comment