使用url_datastore创建索引

时间:2018-11-18 17:49:42

标签: oracle oracle11g oracle-text

我必须在oracle 11中使用参数URL_DATASTORE创建一个索引,但是,当我尝试创建此索引时,oracle会向我返回此错误

create index IDX_IT on informazioni_testi(
indextype is ctxsys.context 
parameters ( 'Datastore CTXSYS.URL_DATASTORE' );

Error starting at line 1 in command:
create index IDX_IT on informazioni_testi(url) 
indextype is ctxsys.context 
parameters ( 'Datastore CTXSYS.FILE_DATASTORE' )
Error at Command Line:1 Column:13
Error report:
SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10758: index owner does not have the privilege to use file or URL datastore
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366
29855. 00000 -  "error occurred in the execution of ODCIINDEXCREATE routine"
*Cause:    Failed to successfully execute the ODCIIndexCreate routine.
*Action:   Check to see if the routine has been coded correctly.

我认为已经给予了所有可能的补助

grant RESOURCE TO parlamento2018; -->GRANT RESOURCE succeeded.
grant CONNECT TO parlamento2018; --> grant CONNECT succeeded.
grant CTXAPP TO parlamento2018; --> grant CTXAPP succeeded.
grant execute on ctx_ddl to parlamento2018; --> grant execute succeeded.
grant execute on CTX_CLS to parlamento2018; --> grant execute succeeded.
grant execute on CTX_DOC to parlamento2018; --> grant execute succeeded.
grant execute on CTX_OUTPUT to parlamento2018; --> grant execute succeeded.
grant execute on CTX_QUERY to parlamento2018; --> grant execute succeeded.
grant execute on CTX_REPORT to parlamento2018; --> grant execute succeeded.
grant execute on CTX_THES to parlamento2018; --> grant execute succeeded.

1 个答案:

答案 0 :(得分:0)

以SYS身份连接并运行

exec ctxsys.ctx_adm.set_parameter('FILE_ACCESS_ROLE', 'KEIICHI')  ;
                                                       -------
                              username that is trying to create index