Home » Server Options » Text & interMedia » PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus (Oracle 11G R2 64bit Linux)
PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus [message #547254] Tue, 13 March 2012 10:27 Go to next message
tristran
Messages: 3
Registered: January 2012
Junior Member
I need to create a subject specific thesaurus in oracle text for a project at my university. Since the database is maintained by another university and the admins there never had users who needed the oracle text features, we try to be as specific as possible with requests. So I installed a local version of oracle 11g XE to test everything beforehand. Once I thought I knew what I needed I asked them for additional roles (CTXAPP, most importantly) and tried the same, I had done locally:

begin
  ctx_thes.create_thesaurus(
    name     => 'FORESTTHESAURUS',
    casesens => false
  );
end;
/


Unfortunately I got this:

SQL> begin
  ctx_thes.create_thesaurus(
    name     => 'FORESTTHESAURUS',
    casesens => false
  );
end;
/  2    3    4    5    6    7
  ctx_thes.create_thesaurus(
  *
ERROR at line 2:
ORA-06550: line 2, column 3:
PLS-00201: identifier 'CTX_THES' must be declared
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored


And now I am slightly confused, why CTX_THES must be declared. Any hints would be welcome.
Re: PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus [message #547273 is a reply to message #547254] Tue, 13 March 2012 11:35 Go to previous messageGo to next message
Michel Cadot
Messages: 68711
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
select status, version from dba_registry where comp_id='CONTEXT';
select object_name, object_type 
from dba_objects 
where owner='CTXSYS' and status != 'VALID' order by 1,2;


Regards
Michel
Re: PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus [message #547284 is a reply to message #547273] Tue, 13 March 2012 12:01 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9100
Registered: November 2002
Location: California, USA
Senior Member
The Express Editions (10g XE and 11g XE) do not support thesauri.
Re: PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus [message #547533 is a reply to message #547273] Wed, 14 March 2012 10:30 Go to previous messageGo to next message
tristran
Messages: 3
Registered: January 2012
Junior Member
@ Michel Cadot
SQL+ throws an error for both:
SQL> select status, version from dba_registry where comp_id='CONTEXT';
select status, version from dba_registry where comp_id='CONTEXT'
                            *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> select object_name, object_type
from dba_objects
where owner='CTXSYS' and status != 'VALID' order by 1,2;  2    3
from dba_objects
     *
ERROR at line 2:
ORA-00942: table or view does not exist


@Barbara Boehmer
Are you certain? There is no default thasaurus, but I created a small one for testing via SQL+, added bt,nt and syn relations and it worked fine. Though I never managed to get ctxload to work. For the real work we use the above mentioned 11g enterprise anyway.
Re: PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus [message #547542 is a reply to message #547533] Wed, 14 March 2012 11:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68711
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You must be a DBA to query these views (or have the SELECT_CATALOG_ROLE role granted to you).
If you can't then ask your DBA to give you the result of the queries.
Anyway, I'd trust Barbara when she says it is not supported in XE.

Regards
Michel
Re: PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus [message #547543 is a reply to message #547533] Wed, 14 March 2012 11:31 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9100
Registered: November 2002
Location: California, USA
Senior Member
In express edition, what happens if you connect as ctxsys and try to describe ctx_thes?
Re: PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus [message #547548 is a reply to message #547543] Wed, 14 March 2012 12:07 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9100
Registered: November 2002
Location: California, USA
Senior Member
With the express editions, you don't get the default thesaurus or supplied knowledge base. There is no way to add a thesaurus into a knowledge base that does not exist, so you cannot use any features that require usage of the knowledge base, such as queries or indexes using ABOUT or THEME or GIST. However, I don't know if you can use CTX_THES to specify a user-defined thesaurus. If so, then you would be able to use CTX_THES.SYN and such for queries that specify that thesaurus. So, you may or may not have some limited functionality. The error message that you are getting indicates that either CTX_THES does not exist or you do not have privileges to see it.

Re: PLS-00201: identifier 'CTX_THES' must be declared, while creating thesaurus [message #547771 is a reply to message #547548] Fri, 16 March 2012 08:00 Go to previous message
tristran
Messages: 3
Registered: January 2012
Junior Member
@Barbara Boehmer
Yes, you can use CTX_THES to specify a user defined thesaurus. So the limited functionality is there. I didn't try to use the knowledge base functions, so I never realised that so many features are missing. Thanks for the advice.

As for the main question, I'll contact the dbas for the production database. Thank you very much for your and Michels advice in this area as well.
Previous Topic: full text search in oracle (merged 2)
Next Topic: ORA-00949: illegal reference to remote database with catsearch
Goto Forum:
  


Current Time: Sun Nov 10 13:44:53 CST 2024