DRG-10758 occurs, how to fix it ?
876352Jul 19 2011 — edited Jan 31 2012I have following sql script to create an Oracle Text test environment for EM. but it fails on DB 11.2 series(tried 11.2.0.1 & 11.2.0.2, both fails)
Since I'm not familar with Oracle Text, can someone please suggest how to fix the ORA error ?
--Preparing Test user account
drop user "leo.li" cascade;
create user "leo.li" identified by oracle default tablespace users quota unlimited on users;
grant select any dictionary,create job,create table,resource, connect,ctxapp,create any index to "leo.li" ;
-- user must have been granted the select privilege on table CTXSYS.CTX_INDEXES
-- otherwise will trigger ORA-01031 error
grant select on CTXSYS.CTX_INDEXES to "leo.li";
grant select on CTXSYS.CTX_INDEX_PARTITIONS to "leo.li";
grant select any table to "leo.li";
-- revoke unlimited tablespace from "leo.li";
grant execute on CTX_CLS to "leo.li" ;
grant execute on CTX_DDL to "leo.li" ;
grant execute on CTX_DOC to "leo.li" ;
grant execute on CTX_OUTPUT to "leo.li" ;
grant execute on CTX_QUERY to "leo.li" ;
grant execute on CTX_REPORT to "leo.li" ;
grant execute on CTX_THES to "leo.li" ;
commit ;
connect "leo.li"/oracle;
--Normal Text index table
create table leo_docs (id NUMBER PRIMARY KEY, text varchar2(200));
insert into leo_docs values (1, '<HTML> California is a state in the US.</HTML>');
insert into leo_docs values (2, '<HTML> Paris is a city in France. </HTML>');
insert into leo_docs values (3, '<HTML> France is in Europe. </HTML>');
--/* CREATING INDEX */
create index idx_leo_docs ON leo_docs(text)
INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS
('FILTER CTXSYS.NULL_FILTER SECTION GROUP CTXSYS.HTML_SECTION_GROUP');
---create url datastore index
begin
ctx_ddl.create_preference('URL_PREF','URL_DATASTORE');
ctx_ddl.set_attribute('URL_PREF','HTTP_PROXY','www-proxy.us.oracle.com');
ctx_ddl.set_attribute('URL_PREF','NO_PROXY','us.oracle.com');
ctx_ddl.set_attribute('URL_PREF','Timeout','300');
end;
/
create table urls(id number primary key, leo_docs varchar2(2000));
insert into urls values(111555,'http://context.us.oracle.com');
insert into urls values(111556,'http://www.sun.com');
--following is wrong to create error in index so that failed counts can be calculated with nonzero
insert into urls values(111557,'http://ww.sun.com');
commit;
prompt 'creating datastore index might take some time'
create index datastores_text on urls (leo_docs)
indextype is ctxsys.context
parameters ( 'Datastore URL_PREF' );
DRG-10758 occurs when executing
"create index datastores_text on urls (leo_docs)
indextype is ctxsys.context
parameters ( 'Datastore URL_PREF' );
"
I checked "Oracle Error Message" and it says:
DRG-10758 index owner does not have the privilege to use this preference
Cause
index owner does not have the role defined in FILE_DATATSTORE_ROLE
Action
grant index owner the appropriate role
From above description, This looks like a privilege issue. maybe the index owner need to
be grantes some role ?
Thanks for your help !
Leo