Create index ctxsys.context error
hello,
I'm trying to set up a text index on oracle 8i and I don't know too much about interMedia. Through SQLPlus i tried:
create index ix_recordtitle on record(recordtitle) indextype is ctxsys.context;
and got the error:
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: interMedia Text error:
DRG-50704: Net8 listener is not running or cannot start external procedures
ORA-28575: unable to open RPC connection to external procedure agent
ORA-06512: at "CTXSYS.DRUE", line 126
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 54
ORA-06512: at line 1
so my question is, is interMedia a standard package/service that is installed w/ oracle 8i, or does it need to be installed? Or am I missing something else?
thanks in advance for any help,
-derek
That is, you have to have a listener tthat will listen to IPC, with topic 'extproc'. In tnsnames.ora, it looks much like this:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <my host>)(PORT = 1521))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
(PROTOCOL_STACK =
(PRESENTATION = TTC)
(SESSION = NS)
(CONNECT_DATA =
(SERVICE_NAME = <my sid>)
# blah-blah
SID_LIST_LISTENER =
(SID_LIST =
# other addresses' blah-blah here
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = <oracle home path>)
(PROGRAM = extproc)
null
Similar Messages
-
Error in Updating ctxsys.context index using ctxsrv
Environment :
Linux 6.2,
Oracle 8.1.6
character set : zhs16gbk or zhs16cgb231280
I can create an ctxsys.context index(using CHINESE_VGRAM_LEXER) on a long column, and i can rebuild this index with no parameters.
When i want to rebuild this index automatic using ctxsrv, this error occur ---
DRG-50857 Oracle error in drtldml(dml)
Ora-2000 error
anybody can help me?
nullthe complete error:
Dml batch: cid=1023
End batch: return code is 1
DRG-50857: oracle error in drtldml(dml)
ORA_20000: interMedia text 4mNs
DRG-50857: oracle error in drsxsopen
ORA-01480: STR83V51dA?H1IY?U:sW:
null -
Question: create index indextype is ctxsys.context whith NOLOGGING
Dear All,
I would like to ask a question about
CREATE INDEX <index_name> ON <table_name> ( <index_col> ) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ( ... )maybe you experienced that ctxsys.context index creation takes long time.
When you create a ctxsys.context index it is obvious to reduce the workload of the RDBMS. In this case I would like to reduce the I/O load with NOLOGGING option.
Firstly, I try to put the index into a tablespace with no logging option. I don't know why but it is not working. Watching the alert.log file I diagnose that redo log generated simultaneously while index generated (there are no other activity on RDBMS).
Q1 (optional): Why generating redo on object of NOLOGGING tablaspace ?
I think there are better solution: use the NOLOGGIN option of the create index command which is very simple to use at column indexes.
Which unclear to me how should I use in CREATE INDEX .. INDEXTYPE IS CTXSYS.CONTEXT command.
Fllowing the CREATE INDEX command syntax seems oubvious - but it provides sytax error.
Maybe this is why CREATE INDEX .. INDEXTYPE IS CTXSYS.CONTEXT needs something different for options: PL/SQL
example captured (for options):
begin
ctx_ddl.create_preference ('mystore', 'BASIC_STORAGE');
ctx_ddl.set_attribute ('mystore', 'I_INDEX_CLAUSE', 'tablespace users storage (initial 32k) compress 2');
end;
CREATE INDEX docs_idx ON my_docs(doc) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('STORAGE mystore');Q: How can I specify NOLOGGING option? In the index command? In the attribute? What is the exact syntax if NOLOGGING is allowed at ctxsys.context?
Oracle version: 11.1.0.6.0
Any advice, highly appreciated.
IstvanYou have to specify nologging in storage preference.
See Avoiding Redo Logging for an Oracle Text Domain Index (Doc ID 432762.1)
Example:
begin
ctx_ddl.drop_preference('my_storage');
end;
begin
ctx_ddl.create_preference('my_storage','BASIC_STORAGE');
end;
begin
ctx_ddl.set_attribute('my_storage', 'i_table_clause','tablespace foo1 storage (initial 5M next 10M pctincrease 0 freelists 24 freelist groups 24) nologging');
ctx_ddl.set_attribute('my_storage', 'k_table_clause','tablespace foo2 storage (initial 5M next 10M pctincrease 0) nologging');
ctx_ddl.set_attribute('my_storage', 'r_table_clause','tablespace foo3 storage (initial 5M next 10M pctincrease 0) lob(DATA) store as (nocache nologging) nologging');
ctx_ddl.set_attribute('my_storage', 'n_table_clause','tablespace foo4 storage (initial 5M next 10M pctincrease 0) nologging');
ctx_ddl.set_attribute('my_storage', 'p_table_clause','tablespace foo5 storage (initial 5M next 10M pctincrease 0) nologging');
ctx_ddl.set_attribute('my_storage', 'i_index_clause','tablespace foo6 storage (initial 5M next 10M pctincrease 0) compress 2 nologging');
end; -
Hi,
in the following enviroment:
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
With the Partitioning option
JServer Release 9.0.1.1.1 - Production
On an MS 2K box
I experience the following problem:
if I create a table
create table test(c type);
where type is varchar2 o clob I then succesfully issue this
command:
create index test_ctx on test(c) indextype is ctxsys.context;
but if type is sys.XMLType I get :
ORA-01031: insufficient privileges.
Any suggestion
Thanks
AlexUnder user sys as sysdba the following happens:
SQL> create table test(c XMLType);
Table created.
SQL> create index test_ctx on test(c) indextype is
ctxsys.context;
create index test_ctx on test(c) indextype is ctxsys.context
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE
routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drixtab.create_index_tables
ORA-00955: name is already used by an existing object
ORA-06512: at "CTXSYS.DRUE", line 157
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 176 -
Getting error while creating index in RAC environment in 11g
Hi All,
I am new to RAC concept while creating index getting below error
Error: AX_DISABLE_HIST - SQL Error. Error Position: 0
Return: 12801 - ORA-12801: error signaled in parallel query server P146, instance
ORA-12853: insufficient memory for PX buffers: current 425904K,
max needed 11105280K ORA-04031: unable to allocate 32792 bytes of shared memory ("shared pool","unknow
CREATE UNIQUE iNDEX PS_AX_DISABLE_HIST ON PS_AX_DISABLE_HIST (EMPLID) TABLESPACE PSINDEX STORAGE
(INITIAL 40000 NEXT 65536 MAXEXTENTS UNLIMITED PCTINCREASE 0) PCTFREE 10 PARALLEL NOLOGGING
am not able to understanding is this issue is related to index or sga memory. can any once help me on this.
Thanks in advance
Prabhakar
Edited by: 889571 on May 16, 2013 7:41 AMHi,
Please read the below link for ORA-04031 (Insufficient Memory).
http://blog.tanelpoder.com/2009/06/04/ora-04031-errors-and-monitoring-shared-pool-subpool-memory-utilization-with-sgastatxsql/
Thanks -
Proxy error while creating index
hi all
i've configured Trex name server in j2ee visual admin,and ialso configure the prosy server in the following path
System Administration ® System Configuration ® Service Configuration ® Applications (Content Catalog) ® com.sap.portal.ivs.httpservice ® Services ® Proxy
by giving host name
but while creating index the following error occured
Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request POST /irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fadministrator!2fsuper_admin!2fsuper_admin_role!2fcom.sap.portal.system_administration!2fcom.sap.portal.system_configuration!2fcom.sap.km.AdminConfig!2fcom.sap.km.AdminSystemIndexes!2fcom.sap.km.IndexAdmin. Reason: Error reading from remote server -
Apache/2.0.52 (Fedora) Server at www.entegs.com Port 80
and in SysAdmin/SysComfig/Km/Trex Monitor the following error is displaying
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /irj/servlet/prt/portal/prtroot/com.sap.portal.pagebuilder.IviewModeProxy.
Reason: Error reading from remote server
Apache/2.0.52 (Fedora) Server at www.entegs.com Port 80
can any one give me the appropriate solution for the above,its very urgent.
awaiting for replies
Regards
Gnana
Note:also tell me how to rate for replies coz through this forums i solved many problemsHi Gnana,
as there seem to be no replies here and I do not have one either, please submit a support message to SAP and be prepared to grant system access.
Regards,
Karsten -
Couldn't create index errorcode 0
Hi Expert,
I would like to create index for web repository.
1. create HTTP system
2. create web site
3. create web repository
4. create crawler parameter
and tried to create index by select TREX Search service and crawler in step4.
but found this msg. " Index could not be created; creating index failed: no error (Errorcode 0) "
(also TREX Search and Classification and TREX Classification service)
before I tried to create web index, I created PCD content successfully!.
I checked TREX monitor,HTTP Server and Name Server is Green.
How can I check the crawler status, does it collect data successfully?
Please kindly suggest me.
Regards,
Kanok-on K.The URL of the TREXWebServer wasn't correct
-
Creating CTXSYS.CONTEXT type index for orddoc
Hi,
We tried to create a index for a orddoc datatype , the syntax used was as below
CREATE INDEX CIX_DLX_ASSET1 ON DLX_ASSET(TEXT_ASSET.source.localdata) INDEXTYPE IS CTXSYS.CONTEXT;
where DLX_ASSET is the table name and TEXT_ASSET is of the type Orddoc.
When we tried to create the index we are getting the below error message
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "CTXSYS.DRUE", line 157
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 204
But the index is being created but it is not proper and contain query doesnot work properly on it
However we were able to create an index for TEXT_ASSET.comments as below
CREATE INDEX CIX_TBL_ASSET1 ON TBL_ASSET(TEXT_ASSET.comments) INDEXTYPE IS CTXSYS.CONTEXT;
The step we had followed are as below
Granted required permission to the User owning the index.
GRANT CTXAPP to User
GRANT EXECUTE ON CTX_CLS TO User;
GRANT EXECUTE ON CTX_DDL TO User;
GRANT EXECUTE ON CTX_DOC TO User;
GRANT EXECUTE ON CTX_OUTPUT TO User;
GRANT EXECUTE ON CTX_QUERY TO User;
GRANT EXECUTE ON CTX_REPORT TO User;
GRANT EXECUTE ON CTX_THES TO User;
All the package of the ctxsys is complied
The ctxsrv has been stared as below
ctxsrv -user ctxsys/ctxsys
and is up and runing.Dear
Here are the error explanations;
ORA-06502: PL/SQL: numeric or value error string
Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
ORA-29855:
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.Ogan -
Oracle Text, create index (indextype is ctxsys.context)
Dear sirs,
I am a new user of Oracle Text (Oracle 11g release 11.2) and I am unable to create an index of type ctxsys.context). Any suggestions?:
code:
drop table mytable;
drop index myindex force;
create table mytable(id number primary key, docs clob);
insert into mytable values(111555,'this text will be indexed');
insert into mytable values(111556,'this is a default datastore example');
commit;
create index myindex on mytable(docs)
indextype is ctxsys.context
parameters ('DATASTORE CTXSYS.DEFAULT_DATASTORE');
+++++++
error messages:
create index myindex on mytable(docs)
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366Please check for invalid objects. Log on as sys or system and run:
select owner, object_name, object_type from all_objects where status='INVALID';
Post the results here and we'll advise the next step.
If any objects owned by CTXSYS are invalid you may need to recompile the CTXSYS schema. -
Hello everybody,
I have from time to time to create Intermedia or Oracle text indexes in Oracle databes, most 10g ones.
Today I did it in a Oracle 10g under Linux RHEL 5, with this few usual commands:
1) connect SYS/**** as SYSDBA;
2) CREATE TABLESPACE "DRSYS" LOGGING DATAFILE '/path_to_index_files/drsys.ora' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO;
3) @$ORACLE_HOME/ctx/admin/catctx.sql ctxsys DRSYS TEMP NOLOCK
4) connect ctxsys/ctxsys;
5) @$ORACLE_HOME/ctx/admin/defaults/drdeff.sql;
6) connect sa/*****;
7) CREATE INDEX pj_index ON sa.tpiecejointe(pjcontenu) INDEXTYPE IS ctxsys.context parameters ('sync (every "SYSDATE+12/24")');
My issue occured at the 7th step:
CREATE INDEX pj_index ON sa.tpiecejointe(pjcontenu) INDEXTYPE IS ctxsys.context parameters ('sync (every "SYSDATE+12/24")')
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-11206: user filter command /dk2/app/oracle/ctx/bin/ctxhx could not be
executed
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
/dk2/app/oracle/ctx/bin/ctxhx is ok and may be executed by anyone.
I found no reason for this problem on the Web.
If somebody can help, thanks a lot...
ThomasHi,
for using the sync parameter, the user needs to be granted to execute a job. Oracle makes a job to do the sync. So issue:
GRANT CREATE JOB TO SMADMIN;
from SYS/SYSTEM.
Herald ten Dam
superconsult.nl -
Creating a single context index on a one-to-many and lookup table
Hello,
I've been successfully setting up text indexes on multiple columns on the same table (using MULTI_COLUMN_DATASTORE preferences), but now I have a situation with a one-to-many data collection table (with a FK to a lookup table), and I need to search columns across both of these tables. Sample code below, more of my chattering after the code block:
CREATE TABLE SUBMISSION
( SUBMISSION_ID NUMBER(10) NOT NULL,
SUBMISSION_NAME VARCHAR2(100) NOT NULL
CREATE TABLE ADVISOR_TYPE
( ADVISOR_TYPE_ID NUMBER(10) NOT NULL,
ADVISOR_TYPE_NAME VARCHAR2(50) NOT NULL
CREATE TABLE SUBMISSION_ADVISORS
( SUBMISSION_ADVISORS_ID NUMBER(10) NOT NULL,
SUBMISSION_ID NUMBER(10) NOT NULL,
ADVISOR_TYPE_ID NUMBER(10) NOT NULL,
FIRST_NAME VARCHAR(50) NULL,
LAST_NAME VARCHAR(50) NULL,
SUFFIX VARCHAR(20) NULL
INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (1, 'Some Research Paper');
INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (2, 'Thesis on 17th Century Weather Patterns');
INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (3, 'Statistical Analysis on Sunny Days in March');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (1, 'Department Chair');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (2, 'Department Co-Chair');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (3, 'Professor');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (4, 'Associate Professor');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (5, 'Scientist');
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (1,1,2,'John', 'Doe', 'PhD');
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (2,1,2,'Jane', 'Doe', 'PhD');
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (3,2,3,'Johan', 'Smith', NULL);
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (4,2,4,'Magnus', 'Jackson', 'MS');
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (5,3,5,'Williard', 'Forsberg', 'AMS');
COMMIT;I want to be able to create a text index to lump these fields together:
SUBMISSION_ADVISORS.FIRST_NAME
SUBMISSION_ADVISORS.LAST_NAME
SUBMISSION_ADVISORS.SUFFIX
ADVISOR_TYPE.ADVISOR_TYPE_NAME
I've looked at DETAIL_DATASTORE and USER_DATASTORE, but the examples in Oracle Docs for DETAIL_DATASTORE leave me a little bit perplexed. It seems like this should be pretty straightforward.
Ideally, I'm trying to avoid creating new columns, and keeping the trigger adjustments to a minimum. But I'm open to any and all suggestions. Thanks for for your time and thoughts.
-JamieI would create a procedure that creates a virtual document with tags, which is what the multi_column_datatstore does behind the scenes. Then I would use that procedure in a user_datastore, so the result is the same for multiple tables as what a multi_column_datastore does for one table. I would also use either auto_section_group or some other type of section group, so that you can search using WITHIN as with the multi_column_datastore. Please see the demonstration below.
SCOTT@orcl_11gR2> -- tables and data that you provided:
SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION
2 ( SUBMISSION_ID NUMBER(10) NOT NULL,
3 SUBMISSION_NAME VARCHAR2(100) NOT NULL
4 )
5 /
Table created.
SCOTT@orcl_11gR2> CREATE TABLE ADVISOR_TYPE
2 ( ADVISOR_TYPE_ID NUMBER(10) NOT NULL,
3 ADVISOR_TYPE_NAME VARCHAR2(50) NOT NULL
4 )
5 /
Table created.
SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION_ADVISORS
2 ( SUBMISSION_ADVISORS_ID NUMBER(10) NOT NULL,
3 SUBMISSION_ID NUMBER(10) NOT NULL,
4 ADVISOR_TYPE_ID NUMBER(10) NOT NULL,
5 FIRST_NAME VARCHAR(50) NULL,
6 LAST_NAME VARCHAR(50) NULL,
7 SUFFIX VARCHAR(20) NULL
8 )
9 /
Table created.
SCOTT@orcl_11gR2> INSERT ALL
2 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
3 VALUES (1, 'Some Research Paper')
4 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
5 VALUES (2, 'Thesis on 17th Century Weather Patterns')
6 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
7 VALUES (3, 'Statistical Analysis on Sunny Days in March')
8 SELECT * FROM DUAL
9 /
3 rows created.
SCOTT@orcl_11gR2> INSERT ALL
2 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
3 VALUES (1, 'Department Chair')
4 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
5 VALUES (2, 'Department Co-Chair')
6 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
7 VALUES (3, 'Professor')
8 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
9 VALUES (4, 'Associate Professor')
10 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
11 VALUES (5, 'Scientist')
12 SELECT * FROM DUAL
13 /
5 rows created.
SCOTT@orcl_11gR2> INSERT ALL
2 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
3 VALUES (1,1,2,'John', 'Doe', 'PhD')
4 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
5 VALUES (2,1,2,'Jane', 'Doe', 'PhD')
6 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
7 VALUES (3,2,3,'Johan', 'Smith', NULL)
8 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
9 VALUES (4,2,4,'Magnus', 'Jackson', 'MS')
10 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
11 VALUES (5,3,5,'Williard', 'Forsberg', 'AMS')
12 SELECT * FROM DUAL
13 /
5 rows created.
SCOTT@orcl_11gR2> -- constraints presumed based on your description:
SCOTT@orcl_11gR2> ALTER TABLE submission ADD CONSTRAINT submission_id_pk
2 PRIMARY KEY (submission_id)
3 /
Table altered.
SCOTT@orcl_11gR2> ALTER TABLE advisor_type ADD CONSTRAINT advisor_type_id_pk
2 PRIMARY KEY (advisor_type_id)
3 /
Table altered.
SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_advisors_id_pk
2 PRIMARY KEY (submission_advisors_id)
3 /
Table altered.
SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_id_fk
2 FOREIGN KEY (submission_id) REFERENCES submission (submission_id)
3 /
Table altered.
SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT advisor_type_id_fk
2 FOREIGN KEY (advisor_type_id) REFERENCES advisor_type (advisor_type_id)
3 /
Table altered.
SCOTT@orcl_11gR2> -- resulting data:
SCOTT@orcl_11gR2> COLUMN submission_name FORMAT A45
SCOTT@orcl_11gR2> COLUMN advisor FORMAT A40
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE sa.advisor_type_id = a.advisor_type_id
10 AND sa.submission_id = s.submission_id
11 /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
Thesis on 17th Century Weather Patterns Professor Johan Smith
Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS
Statistical Analysis on Sunny Days in March Scientist Williard Forsberg AMS
5 rows selected.
SCOTT@orcl_11gR2> -- procedure to create virtual documents:
SCOTT@orcl_11gR2> CREATE OR REPLACE PROCEDURE submission_advisors_proc
2 (p_rowid IN ROWID,
3 p_clob IN OUT NOCOPY CLOB)
4 AS
5 BEGIN
6 FOR r1 IN
7 (SELECT *
8 FROM submission_advisors
9 WHERE ROWID = p_rowid)
10 LOOP
11 IF r1.first_name IS NOT NULL THEN
12 DBMS_LOB.WRITEAPPEND (p_clob, 12, '<first_name>');
13 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.first_name), r1.first_name);
14 DBMS_LOB.WRITEAPPEND (p_clob, 13, '</first_name>');
15 END IF;
16 IF r1.last_name IS NOT NULL THEN
17 DBMS_LOB.WRITEAPPEND (p_clob, 11, '<last_name>');
18 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.last_name), r1.last_name);
19 DBMS_LOB.WRITEAPPEND (p_clob, 12, '</last_name>');
20 END IF;
21 IF r1.suffix IS NOT NULL THEN
22 DBMS_LOB.WRITEAPPEND (p_clob, 8, '<suffix>');
23 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.suffix), r1.suffix);
24 DBMS_LOB.WRITEAPPEND (p_clob, 9, '</suffix>');
25 END IF;
26 FOR r2 IN
27 (SELECT *
28 FROM submission
29 WHERE submission_id = r1.submission_id)
30 LOOP
31 DBMS_LOB.WRITEAPPEND (p_clob, 17, '<submission_name>');
32 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r2.submission_name), r2.submission_name);
33 DBMS_LOB.WRITEAPPEND (p_clob, 18, '</submission_name>');
34 END LOOP;
35 FOR r3 IN
36 (SELECT *
37 FROM advisor_type
38 WHERE advisor_type_id = r1.advisor_type_id)
39 LOOP
40 DBMS_LOB.WRITEAPPEND (p_clob, 19, '<advisor_type_name>');
41 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r3.advisor_type_name), r3.advisor_type_name);
42 DBMS_LOB.WRITEAPPEND (p_clob, 20, '</advisor_type_name>');
43 END LOOP;
44 END LOOP;
45 END submission_advisors_proc;
46 /
Procedure created.
SCOTT@orcl_11gR2> SHOW ERRORS
No errors.
SCOTT@orcl_11gR2> -- examples of virtual documents that procedure creates:
SCOTT@orcl_11gR2> DECLARE
2 v_clob CLOB := EMPTY_CLOB();
3 BEGIN
4 FOR r IN
5 (SELECT ROWID rid FROM submission_advisors)
6 LOOP
7 DBMS_LOB.CREATETEMPORARY (v_clob, TRUE);
8 submission_advisors_proc (r.rid, v_clob);
9 DBMS_OUTPUT.PUT_LINE (v_clob);
10 DBMS_LOB.FREETEMPORARY (v_clob);
11 END LOOP;
12 END;
13 /
<first_name>John</first_name><last_name>Doe</last_name><suffix>PhD</suffix><submission_name>Some
Research Paper</submission_name><advisor_type_name>Department Co-Chair</advisor_type_name>
<first_name>Jane</first_name><last_name>Doe</last_name><suffix>PhD</suffix><submission_name>Some
Research Paper</submission_name><advisor_type_name>Department Co-Chair</advisor_type_name>
<first_name>Johan</first_name><last_name>Smith</last_name><submission_name>Thesis on 17th Century
Weather Patterns</submission_name><advisor_type_name>Professor</advisor_type_name>
<first_name>Magnus</first_name><last_name>Jackson</last_name><suffix>MS</suffix><submission_name>The
sis on 17th Century Weather Patterns</submission_name><advisor_type_name>Associate
Professor</advisor_type_name>
<first_name>Williard</first_name><last_name>Forsberg</last_name><suffix>AMS</suffix><submission_name
Statistical Analysis on Sunny Days inMarch</submission_name><advisor_type_name>Scientist</advisor_type_name>
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> -- user_datastore that uses procedure:
SCOTT@orcl_11gR2> BEGIN
2 CTX_DDL.CREATE_PREFERENCE ('sa_datastore', 'USER_DATASTORE');
3 CTX_DDL.SET_ATTRIBUTE ('sa_datastore', 'PROCEDURE', 'submission_advisors_proc');
4 END;
5 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> -- index (on optional extra column) that uses user_datastore and section group:
SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD (any_column VARCHAR2(1))
2 /
Table altered.
SCOTT@orcl_11gR2> CREATE INDEX submission_advisors_idx
2 ON submission_advisors (any_column)
3 INDEXTYPE IS CTXSYS.CONTEXT
4 PARAMETERS
5 ('DATASTORE sa_datastore
6 SECTION GROUP CTXSYS.AUTO_SECTION_GROUP')
7 /
Index created.
SCOTT@orcl_11gR2> -- what is tokenized, indexed, and searchable:
SCOTT@orcl_11gR2> SELECT token_text FROM dr$submission_advisors_idx$i
2 /
TOKEN_TEXT
17TH
ADVISOR_TYPE_NAME
AMS
ANALYSIS
ASSOCIATE
CENTURY
CHAIR
CO
DAYS
DEPARTMENT
DOE
FIRST_NAME
FORSBERG
JACKSON
JANE
JOHAN
JOHN
LAST_NAME
MAGNUS
MARCH
PAPER
PATTERNS
PHD
PROFESSOR
RESEARCH
SCIENTIST
SMITH
STATISTICAL
SUBMISSION_NAME
SUFFIX
SUNNY
THESIS
WEATHER
WILLIARD
34 rows selected.
SCOTT@orcl_11gR2> -- sample searches across all data:
SCOTT@orcl_11gR2> VARIABLE search_string VARCHAR2(100)
SCOTT@orcl_11gR2> EXEC :search_string := 'professor'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE CONTAINS (sa.any_column, :search_string) > 0
10 AND sa.advisor_type_id = a.advisor_type_id
11 AND sa.submission_id = s.submission_id
12 /
SUBMISSION_NAME ADVISOR
Thesis on 17th Century Weather Patterns Professor Johan Smith
Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS
2 rows selected.
SCOTT@orcl_11gR2> EXEC :search_string := 'doe'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
2 rows selected.
SCOTT@orcl_11gR2> EXEC :search_string := 'paper'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
2 rows selected.
SCOTT@orcl_11gR2> -- sample searches within specific columns:
SCOTT@orcl_11gR2> EXEC :search_string := 'chair'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN advisor_type_name') > 0
10 AND sa.advisor_type_id = a.advisor_type_id
11 AND sa.submission_id = s.submission_id
12 /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
2 rows selected.
SCOTT@orcl_11gR2> EXEC :search_string := 'phd'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN suffix') > 0
10 AND sa.advisor_type_id = a.advisor_type_id
11 AND sa.submission_id = s.submission_id
12 /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
2 rows selected.
SCOTT@orcl_11gR2> EXEC :search_string := 'weather'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN submission_name') > 0
10 AND sa.advisor_type_id = a.advisor_type_id
11 AND sa.submission_id = s.submission_id
12 /
SUBMISSION_NAME ADVISOR
Thesis on 17th Century Weather Patterns Professor Johan Smith
Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS
2 rows selected. -
Error creating index (trailing null missing from STR bind value)
I'm having the following error:
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: interMedia Text error:
DRG-50857: oracle error in dreii0fsh
ORA-01480: trailing null missing from STR bind value
ORA-06512: at "CTXSYS.DRUE", line 157
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 176
ORA-06512: at line 1
my script is:
create index IDX_XML on EN_TESTE_XML(TXT_XML_CURRICULO)
indextype is ctxsys.context;
My Oracle is 9.0.1
TXT_XML_CURRICULO -> XMLTYPE then
the section group is PATH_SECTION_GROUP by default.
thanks.
MarlonIf you get an OCI error when simply updating a record in PL/SQL Developer, it sounds like a PL/SQL Developer issue, although not one I've come across. You might try Allround Automations tech support. They'll need your exact versions of Oracle server, Oracle client and PL/SQL Developer.
SQL*Plus is part of the Oracle Client software so you should have it somewhere, or you can download it free. -
InterMedia Error when creating Index
Sorry, the error texts are in French, hopefully someone will help me.
I have checked listner.ora and tnsmanes.ora: they look fine, (however, we have ....KEY=EXTPROC)), not EXTPROC0 as it appears sometimes in the doc) but something must be wrong someplace.
Seems to be related to another question in this forum.
Thanks for any help.
(actually, when running from sql worksheet, I get a Net8 listener ids not running or cannot start external procedure ??
create index quick_text on kd.kd_enseigne(desc_long) indextype is ctxsys.context
ORA-29855: erreur d'exZcution de la routine ODCIINDEXCREATE
ORA-20000: erreur interMedia Text :
DRG-11422: initialisation des services linguistiques impossible
DRG-00100: internal error, arguments : [52100],[drxs.c],[557],[gxtopen],[0]
ORA-06512: S "CTXSYS.DRUE", ligne 126
ORA-06512: S "CTXSYS.TEXTINDEXMETHODS", ligne 54
ORA-06512: S ligne 1
SVRMGR><BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Omar Alonso:
Please post db version and platform. Are you sure the listener is running?<HR></BLOCKQUOTE>
db version is 8.1.5, platform is Linux.
By running the check script we saw that the cartridge was invalid. We had to reinstall anither instance, now it works.
Thank you. -
DRG-50857 and ORA-12838 error while INDEXTYPE IS CTXSYS.CONTEXT
Hi Experts,
I've been encountering an issue while creating INDEX.
If I execute the below script from SQLDEVELOPER line by line, then the index gets created but the weirdest thing is, if I executed the same as one sql file from SQLPLUS or SQLDEVELOPER, I get the error shared below. As we need to deliver as one sql file to customer, how can we fix this issue?
Below is the content of my sql file
ALTER SESSION ENABLE PARALLEL DML;
ALTER SESSION FORCE PARALLEL QUERY;
CREATE INDEX APPS.TEST_N1 ON APPS.EMP_TABLE
EMP_NAME
INDEXTYPE IS CTXSYS.CONTEXT PARALLEL 32;
ALTER INDEX APPS.TEST_N1 NOPARALLEL;
COMMIT;
Below is the error
Session altered.
Elapsed: 00:00:00.00
Session altered.
Elapsed: 00:00:00.00
CREATE INDEX APPS.TEST_N1 ON APPS.EMP_TABLE
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in dripref.set_preferences
ORA-12838: cannot read/modify an object after modifying it in parallel
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366
Elapsed: 00:00:02.82
Index altered.
Elapsed: 00:00:00.01
Commit complete.I get the same error in 11g, as shown below, but not in 12c, as shown below that. So, it looks like there has been a change in the way that Oracle Text does things between versions. When you create an Oracle Text Context index, it creates some domain index tables. Apparently there is some change involved behind the scenes in the dripref.set_preferences procedure that perhaps does an append or some such thing. If you post this question in the Text space/sub-forum, with a link to this thread, you may get a more detailed explanation and perhaps a workaround from Oracle Text product manager Roger Ford or others. Or, perhaps some moderator will move this thread there.
SCOTT@orcl> SELECT banner FROM v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
5 rows selected.
SCOTT@orcl> CREATE TABLE emp_table AS SELECT ename emp_name FROM emp;
Table created.
SCOTT@orcl> ALTER SESSION ENABLE PARALLEL DML;
Session altered.
SCOTT@orcl> ALTER SESSION FORCE PARALLEL QUERY;
Session altered.
SCOTT@orcl> CREATE INDEX SCOTT.TEST_N1 ON SCOTT.EMP_TABLE
2 (
3 EMP_NAME
4 )
5 INDEXTYPE IS CTXSYS.CONTEXT PARALLEL 32;
CREATE INDEX SCOTT.TEST_N1 ON SCOTT.EMP_TABLE
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in dripref.set_preferences
ORA-12838: cannot read/modify an object after modifying it in parallel
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366
SCOTT@orcl> ALTER INDEX SCOTT.TEST_N1 NOPARALLEL;
Index altered.
SCOTT@orcl> COMMIT;
Commit complete.
SCOTT@orcl12c> SELECT banner FROM v$version;
BANNER
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
CORE 12.1.0.1.0 Production
TNS for 64-bit Windows: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 - Production
5 rows selected.
SCOTT@orcl12c> CREATE TABLE emp_table AS SELECT ename emp_name FROM emp;
Table created.
SCOTT@orcl12c> ALTER SESSION ENABLE PARALLEL DML;
Session altered.
SCOTT@orcl12c> ALTER SESSION FORCE PARALLEL QUERY;
Session altered.
SCOTT@orcl12c> CREATE INDEX SCOTT.TEST_N1 ON SCOTT.EMP_TABLE
2 (
3 EMP_NAME
4 )
5 INDEXTYPE IS CTXSYS.CONTEXT PARALLEL 32;
Index created.
SCOTT@orcl12c> ALTER INDEX SCOTT.TEST_N1 NOPARALLEL;
Index altered.
SCOTT@orcl12c> COMMIT;
Commit complete. -
Ctxsys.context index on registered schema xmltype column
9iR2
Is it possible to create a text index (indextype is ctxsys.context) on a schema registered xmltype column?
I tried it, the index creation works fine.
After the first insert statement the Oracle process seems to hang. (CPU 100%, increasing memory consumption)Yes, I previously entered some data.
Test case:
1. register schema
begin
DBMS_XMLSCHEMA.REGISTERSCHEMA('http://localhost/JobPositionSeeker-1_1.xsd',
getDocument('JobPositionSeeker-1_1.xsd'), TRUE, TRUE, FALSE, FALSE
end;
2. create table
CREATE TABLE application_xml of XMLType
XMLSCHEMA "http://localhost/JobPositionSeeker-1_1.xsd" ELEMENT "JobPositionSeeker"
3. entered some data
4. created the index
create index applicant on application_xml ( SYS_NC_ROWINFO$)
indextype is ctxsys.context
5. select using index
select value(a).getClobVal() from application_xml a
where contains( value(a),'%ai% INPATH(//PersonalData/PersonName/FamilyName)')>0
6. insert another record
-> crash
Maybe you are looking for
-
Error - Creation of Billing Document - Item is not relevant for billing
Hi While trying to Create a Billing document after entering the Order No.the following error msg shown in the Tool Bar No Billing Documents were generated. See log The Error Log shows the following msg with Yellow coloured indication : 000000xxxxxx 0
-
Hello friends; I want to delete material entered in the field "configurable material" under "plant- specific configuration" tab in mrp3 view. There is no any requirement for material. Please help me.
-
hi all i want to set current date to my databse from my JSP page i m using java.sql.Date d = (java.sql.Date) new java.util.Date();its not showing error in netbeans bt,grenerates casting exception: can not cast java.util.date to java.sql.Date How to d
-
I appear to have duplicate music in my iTunes
How do I get rid of duplicate music from my iTunes library, I appear to have almost twice as much music taking up storage, when I ask iTunes to show duplicates there is a massive list revealed. How does this happen and how can I delete them.
-
Clean install with nVidia 8800GT issue
I know that you either need a legacy graphics card or a 10.5.2+ installation DVD/CD to be able to do a clean install. There is a number of workarounds also and I used one of them. I restarted my MacPro in TARGET DISK MODE and connected it via FireWir