Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3908467
  • 博文数量: 534
  • 博客积分: 10470
  • 博客等级: 上将
  • 技术积分: 4800
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-26 14:08
文章分类

全部博文(534)

文章存档

2021年(1)

2019年(1)

2017年(1)

2016年(2)

2013年(2)

2012年(10)

2011年(43)

2010年(10)

2009年(17)

2008年(121)

2007年(253)

2006年(73)

分类: Oracle

2007-03-14 17:51:26

CREATE INDEX salary_index ON employees(salary)
   INDEXTYPE IS position_indextype;

ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-01031: insufficient privileges
ORA-06512: at "usergan.type_name", line 1

 STATIC FUNCTION ODCIINDEXCREATE (ia SYS.ODCIINDEXINFO, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER
  IS
   stmt   VARCHAR2(2000);
  BEGIN
   -- construct the sql statement
   stmt := 'Create Table ' || ia.INDEXSCHEMA || '.' || ia.INDEXNAME ||
           '_STORAGE_TAB' || '(col_val, base_rowid, constraint pk PRIMARY KEY ' ||
           '(col_val, base_rowid)) ORGANIZATION INDEX AS SELECT ' ||
           ia.INDEXCOLS(1).COLNAME || ', ROWID FROM ' ||
           ia.INDEXCOLS(1).TABLESCHEMA || '.' || ia.INDEXCOLS(1).TABLENAME;

   EXECUTE IMMEDIATE stmt;
   RETURN ODCICONST.SUCCESS;
  END;

The user I set it "CONNECT, RESOURCE" privileges.
Find More information about the error, i have not found it.
set the create user with DBA privilege, and the also is error ORA-01031.
The last time I find it, must set CREATE ANY TABLE privilege.

If you want learn more about indextype, see Oracle document about "Using Extensible Index", or use google find more.
阅读(1429) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~