Failed to successfully execute the ODCIIndexCreate routine. - Oracle Spatial Indexing - oracle

I have two oracle spatial tables, namely, restaurants and persons. The structures of these two tables are:
CREATE TABLE restaurants(
id NUMBER PRIMARY KEY,
name VARCHAR2(32),
shape SDO_GEOMETRY
);
CREATE TABLE persons(
p_id NUMBER PRIMARY KEY,
p_name VARCHAR2(32),
p_shape SDO_GEOMETRY
);
Then, after populating each table I wanted to create spatial index for each table. The following instruction for restaurants table executed successfully.
CREATE INDEX restaurants_spatial_idx
ON restaurants(shape)
INDEXTYPE IS mdsys.spatial_index;
But, when I wrote for persons table:
CREATE INDEX persons_spatial_idx
ON persons(p_shape)
INDEXTYPE IS mdsys.spatial_index;
This gave me the following error in sql developer 3.2.20:
Error starting at line 340 in command:
CREATE INDEX persons_spatial_idx
ON persons(p_shape)
INDEXTYPE IS mdsys.spatial_index
Error at Command Line:340 Column:14
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 - "name is already used by an existing object"
Cause:
Action:
As this was saying that I have already and index named persons_spatial_idx, I deleted this index using: DROP INDEX persons_spatial_idx; Then when I tried to create the index again, it produced the following error:
Error starting at line 340 in command:
CREATE INDEX persons_spatial_idx
ON persons(p_shape)
INDEXTYPE IS mdsys.spatial_index
Error at Command Line:340 Column:14
Error report:
SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in spatial index: [mdrcrtxfergm]
ORA-13249: Error in spatial index: [mdpridxtxfergm]
ORA-13200: internal error [ROWID:AAAFGnAABAAALHpAAA] in spatial indexing.
ORA-13206: internal error [] while creating the spatial index
ORA-13365: layer SRID does not match geometry SRID
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
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.
Thanks for reading.

The message is saying that an object with name PERSONS_SPATIAL_IDX already exists.
You can use the following query to find the existing index:
select *
from all_indexes
where index_name = 'PERSONS_SPATIAL_IDX'

Related

Thoughts on why I'm getting an error creating an index

I'm trying to create an index in Oracle 12c and I keep getting an error
I have ensured that DOCUSER has Create Sequence and Create Table, I've also tried creating this index logged in as SYS. I've also check tomake sure that there was a column named "TRACK_DT" in the PDF_TRACKER table
CREATE INDEX DOCUSER.TRACK_DT_TRACKER ON DOCUSER.PDF_TRACKER (TRACK_DT) INDEXTYPE IS CTXSYS.CONTEXT;
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error: DRG-10509: invalid text column: TRACK_DT
ORA-06512: at "CTXSYS.DRUE", line 171 ORA-06512: at
"CTXSYS.TEXTINDEXMETHODS", line 316

Errors in creating spatial index on SDO_GEOMETRY column in oracle 11g

I am using Oracle 11g (Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production) and I have a table that has column of type SDO_GEOMETRY. I want to create a spatial index on this column (NEW_SHAPE). My query is as following:
CREATE INDEX GIS_GEOM_SRID3857_SPTIDX ON GIS_GEOM_SRID3857_LOOKUP ( NEW_SHAPE )
INDEXTYPE IS MDSYS.SPATIAL_INDEX;
/
and I am getting the following errors:
Error starting at line : 23 in command -
CREATE INDEX GIS_GEOM_SRID3857_SPTIDX ON GIS_GEOM_SRID3857_LOOKUP ( NEW_SHAPE )
INDEXTYPE IS MDSYS.SPATIAL_INDEX
Error report -
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: SRID 3857 does not exist in MDSYS.CS_SRS table
ORA-29400: data cartridge error
Error - OCI_NODATA
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
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.
I have searched allot on these errors but have not found anything useful. I would highly appreciate if you may point me to the right direction and help in identifying the issue I am facing. It will save me allot of time. Many thanks in advance for your assistance.
First of all, your data must actually be SRID 3857 and sdo_geom.srid be set to 3857 for all rows of the table, for future processing to work.
Now, since the error raises, srid is set to 3857 in user_sdo_geom_metadata. So the question is: Does SRID 3857 exist in DB's SRIDs?
If not, you must insert it, drop the spatial index (usually a failed index gets created) and re-create it.
Let me know if you need any help on any of the above...

error when collecting tokens from a full text database

I want to test Oracle's CTX_DOC.TOKENS procedure in order to count the number of occurrence of a string into a document.
For this, I have:
create table documents (id number primary key, text bfile);
insert into documents values (1, bfilename('MY_DIR','12things_about_122.pdf'));
create index documents_idx on documents (text) indextype is ctxsys.context;
declare
the_tokens ctx_doc.token_tab;
begin
ctx_doc.set_key_type ('PRIMARY_KEY');
ctx_doc.tokens('documents_idx','1',the_tokens);
dbms_output.put_line('Number of tokens: '|| the_tokens.count);
end;
When I test this, the PLSQL part fails with:
Error report:
ORA-20000: Oracle Text error:
DRG-10001: can not access result table the_tokens
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DOC", line 862 ORA-06512: at line 5
00000 - "%s"
*Cause: The stored procedure 'raise_application_error'
was called which causes this error to be generated.
*Action: Correct the problem as described in the error message or contact
the application administrator or DBA for more information.
Can you help me to understand what is needed much more in order to work correctly, please?
Thank you,
it seems that the answer was too easy to be seen from the 1st time:
It was necessary to referenciate the ctx_doc.token_tab; with schema name, too.
Instead of the_tokens ctx_doc.token_tab, I had to do the_tokens ctxsys.ctx_doc.token_tab;

ORA-00604: error occurred at recursive SQL level 1 ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 22

While doing an import in an oracle 10G database using imp, I receive following error:
IMP-00017: following statement failed with ORACLE error 604:
CREATE TABLE DASHBOARD_ADMINISTRATOR
(ID NUMBER(19, 0) NOT NULL ENABLE,
USER_NAME VARCHAR2(20) NOT NULL ENABLE,
NAME VARCHAR2(50), FIRST_NAME VARCHAR2(50));
IMP-00003: ORACLE error 604 encountered
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 22
When doing the same thing in TOAD, I have the same error even if I only try to create the table with only 1 column specificied, which is even more strange since I only have 2 lines...
Creating a table called DASHBOARD_ADMINISTRATO is possible, DASHBOARD_ADMINISTRATORR gives again the same error.
However, when I switch places of the words in the name, it works fine.
There is no limit set on tablename length because several of the imported tables have more characters.
I used the same dumpfile to import into oracle 11G and there it was successful.
Any ideas, someone?
Thx for your help.
"character string buffer too small" - Mayby try to increase Varchar Tables. And change number(19,0) to number(19) - ID's is just an integer, they don't have coma, period. In importing/exporting various scenarios came out :)

How to deploy Oracle Dimension table for OLAP Cubes

I followed First Example as well as Second Example to create Cubes in Oracle 10g.
I tried to create cube using query rewrite mechanism in Oracle 10g.
(Intailly tried to create using Analystic workspace manager we got error in that too so only we went for query rewrite mechansism)
We succeded in creating table "PRODUCTS"
Also we succedded in creating Dimension for that table "PRODUCTS"
But when we try to create Attribute for the above "PRODUCTS" table like below
BEGIN
cwm_classify.remove_entity_descriptor_use(28, cwm_utility.DIMENSION_TYPE, 'SH', 'PRODUCTS');
COMMIT;
END
we are getting following error.
Note : We have data inside table too
Error starting at line 1 in command:
begin
cwm_classify.remove_entity_descriptor_use(28, cwm_utility.DIMENSION_TYPE, 'SH', 'PRODUCTS');
commit;
end;
Error report:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "OLAPSYS.CWM$OLAP$DIMENSION", line 242
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "OLAPSYS.CWM$UTIL", line 368
ORA-01403: no data found
ORA-06512: at "OLAPSYS.CWM$CLASSIFY", line 322
ORA-06512: at "OLAPSYS.CWM$CLASSIFY", line 1198
ORA-06512: at line 2
06510. 00000 - "PL/SQL: unhandled user-defined exception"
*Cause: A user-defined exception was raised by PL/SQL code, but
not handled.
*Action: Fix the problem causing the exception or write an exception
handler for this condition. Or you may need to contact your
application administrator or DBA.
When i googled i got suggestion like we have to deploy Dimension also before deploying Cubes.
So i'm trying to create OLAP Cubes for this i need to to deploy Dimension Tables in Oracle.
Is there any way to deploy Dimension is that possible actually?
Suggest me how to do this?
Assuming you are using Analytic Workspace Manager, the OLAP documentation would be a good place to start:
http://download.oracle.com/docs/cd/E11882_01/olap.112/e17123/cubes.htm#BGBDJAAG

Resources