Arnold Cristobal
Arnold Cristobal

Reputation: 851

Oracle, create index with partition by range

How to create an index with partition by date range, the one im using has an error when I run?

  CREATE INDEX "PV_TNPM"."TEJAS_SDH_PM_PDH_IDX2" ON "PV_TNPM"."TEJAS_SDH_PM_PDH" ("DATETIME","NODE_NAME", "NODE_IP", "OBJECT_NAME")
 GLOBAL PARTITION BY RANGE(DATETIME) INTERVAL (INTERVAL '15' MINUTE)
(PARTITION INITIAL_PARTITION VALUES LESS THAN (DATE '2014-10-10') );

But getting an error:

Error starting at line : 11 in command -
CREATE INDEX "PV_TNPM"."TEJAS_SDH_PM_PDH_IDX2" ON "PV_TNPM"."TEJAS_SDH_PM_PDH"     ("DATETIME","NODE_NAME", "NODE_IP", "OBJECT_NAME")
GLOBAL PARTITION BY RANGE(DATETIME) INTERVAL (INTERVAL '15' MINUTE)
(PARTITION INITIAL_PARTITION VALUES LESS THAN (DATE '2014-10-10') )
Error at Command Line : 12 Column : 37
Error report -
SQL Error: ORA-00906: missing left parenthesis
00906. 00000 -  "missing left parenthesis"
*Cause:    
*Action:

Using oracle sql developer.

Upvotes: 5

Views: 3399

Answers (1)

psaraj12
psaraj12

Reputation: 5072

Interval Partitioning is not supported for index in oracle 11g where this feature was introduced

Please note that Interval is not a valid clause for CREATE INDEX and it is valid for CREATE TABLE

INTERVAL CLAUSE IN CREATE TABLE 11G R2

GLOBAL PARTITION CLAUSE IN CREATE INDEX 11G R2

Upvotes: 4

Related Questions