ORA-03113 in spatial query with xmlReader
I run a spatial query with xmlReader. but it occurs a ORA-03113 exception. If i use the OracleDataReader,not through xml, the execution is ok. But i have to get the geometry data through xml. I have try to set the validate connection to True, but it seems useless.
Can some one help me?Thx a lots.
Here is my code:
string id = "scott";
string psw = "tiger";
string source = "Oracle";
string connectionstring = "User Id="+id+";password="+psw+";data source="+source+";validate connection=true";
string sql ="select cname from L218 where sdo_relate(L218.GEOLOC,MDSYS.SDO_geometry(2003,NULL,NULL,MDSYS.SDO_elem_info_array(1,1003,3),MDSYS.SDO_ordinate_array(295596.60260187,2761786.9958782, 316370.598147679,2789383.2780762)),'mask=anyinteract')='TRUE'";
try
Oracle.DataAccess.Client.OracleConnection con = new OracleConnection(connectionstring);
con.Open();
Oracle.DataAccess.Client.OracleCommand cmd = con.CreateCommand();
cmd.XmlCommandType = OracleXmlCommandType.Query;
cmd.BindByName = true;
cmd.CommandText =sql;
XmlReader xmlReader = cmd.ExecuteXmlReader();
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.PreserveWhitespace = false;
xmlDocument.Load(xmlReader);
Console.WriteLine(xmlDocument.OuterXml);
con.Close();
catch (OracleException e)
Console.WriteLine(e);
And it returns:
Oracle.DataAccess.Client.OracleException ORA-03113: end-of-file on communication
channel at Oracle.DataAccess.Client.OracleCommand.XmlHandleException(OracleE
xception e)
at Oracle.DataAccess.Client.OracleCommand.ExecuteXmlQuery(Boolean wantResult)
at Oracle.DataAccess.Client.OracleCommand.ExecuteXmlReader()
Hi Daniel
I ran the validation and some of the geometries were invalid. I have now corrected these and all are OK. The db version is 817. However, I am still getting the same error. It appears to be dependant on what cordinates the query is searching:
Errors
SELECT 1
FROM wpe_misc_site, WPE_PLAN_APPLICATION
WHERE wpe_misc_site.ste_id > 0
AND WPE_PLAN_APPLICATION.APL_ste_id(+) =
wpe_misc_site.ste_id
AND mdsys.sdo_relate(ste_geometry,
MDSYS.SDO_GEOMETRY(2003, 81989, NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
MDSYS.SDO_ORDINATE_ARRAY(278792,187310,278876,187393)),
'mask=anyinteract querytype=window') = 'TRUE';
Substriute those coordinates for 278792,187308,278876,187393 and query works.
Any ideas??
Thanks
Chris
Similar Messages
-
Simple spatial query with different SRID
Can anyone help me with just a real simple spatial query with different SRID.
Here is the error i get when i perform the query:
AND SDO_RELATE(A.geometrie_point, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE'
ERROR at line 4:
ORA-00604: error occurred at recursive SQL level 1
ORA-13207: incorrect use of the [IN COMPATIBLE BOUNDS in SDO_RELATE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 84
ORA-06512: at line 4Hi,
I am using 8.1.7.2 and i have the lattest spatial patch.
From the start i had different SRID. The only thing i changed was the bounds of the coordinate system.
I reset my bounds of the coordinate system with SRID 8307 to -180,
180 in X (longitude), and -90,90 in Y (latitude) to see if the query window geometry
(geom2) will be transformed to the coordinate system of the layer geometries (geom1)
Her is the content of the user_sdo_geom_metadata :
GIS_PCP GEOMETRIE_POINT
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -5800000, 3600000, .00000005), SDO_DIM_ELEMENT('Y', 3516000, 6000000, .00000005))
82227
GIS_TEST GEOMETRIE_POLYGONE
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, .00000005), SDO_DIM_ELEMENT('Y', -90, 90, .00000005))
8307
Here is my query :
select /*+ ordered */ A.no_point
from gis_pcp A, gis_test B
WHERE SDO_RELATE(A.geometrie_POINT, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE';
Here is my result :
WHERE SDO_RELATE(A.geometrie_POINT, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE'
ERROR at line 3:
ORA-00604: error occurred at recursive SQL level 1
ORA-13207: incorrect use of the [IN COMPATIBLE BOUNDS in SDO_RELATE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 84
ORA-06512: at line 4
If i change the bounds of GIS_TEST to the exact bouns of GIS_PCP then i dont have the error message above and i have correct results. Do i have the adjust the bounds of every layer to fit the biggest bound? -
Spatial Query with multiple geometries from 2 tables
Hi,
I'm using Oracle 8.1.7. I am trying to do a spatial query on two tables with multiple geometries. There are two spatial tables. One made up of points and one made up of polygons. There are 829551 rows in the table of points and 1817795 rows in the table with polygons...
I want to find all polygons where one of this points is within it...
This query is pretty intensive querying two large spatial tables against each other and so I need to find the most efficient way of running this query. I've been running variations of my query for the last two week and every time it's bombed out with various errors after 12-24 hrs processing like out of memory, out of tablespace, out of processing, invalid index etc etc etc. I need to get this query run asap... Any tips would be gratefully appreciated..
For the session running the query I've allocated 16M sort area with
ALTER SESSION SET SORT_AREA_SIZE=16777216;
Below is the query I'm running... How can I improve this please? BTW PARCEL_OVERLAPS contains the points and TP$_PARCEL_AREAS the polygons.
SELECT lu.LNU_PARCEL_ID
FROM
seventy.PARCEL_OVERLAPS po,
imap_topol.TP$_PARCEL_AREAS pa,
TP$_PARCEL_CENTROID_AREA pca,
TDCR_LAND_UNIT lu
WHERE
SDO_FILTER(po.geometry, pa.area,
'querytype=WINDOW') = TRUE and
sdo_within_distance(po.geometry,pa.area,'distance=0')='TRUE' and
pa.delete_date is null and
Lu.LNU_LAND_UNIT_UNIQUE_NUM = pca.CENTROID_ID and
pa.AREA_ID = pca.AREA_ID and
pca.DELETE_DATE IS NULL and
pa.DELETE_DATE IS NULL;Albert,
Thanks for your reply and the tips you've given. The tp$_parcel_areas table will always be bigger so I've changed the order to sdo_within_distance(pa.area,po.geometry,'distance=0')='TRUE'. The requested counts for those queries are
12:26:29 [email protected]:SQL> select count(*)
13:46:22 2 from seventy.PARCEL_OVERLAPS;
COUNT(*)
612
13:48:12 [email protected]:SQL> select count(*)
13:48:17 2 from imap_topol.TP$_PARCEL_AREAS pa,
13:48:21 3 TP$_PARCEL_CENTROID_AREA pca
13:48:21 4 where pca.DELETE_DATE IS NULL
13:48:21 5 and pa.DELETE_DATE IS NULL
13:48:21 6 and pa.AREA_ID = pca.AREA_ID;
COUNT(*)
1310665
There was no reason for both filter and within_distance. I did try use the anyinteract but for some reason that does not return the desired results(I've added one id row as a test to make sure it returns desired results). Plus Oracle have recomended using the within distance for better performance..
so the explan plan for
14:38:37 [email protected]:SQL> EXPLAIN PLAN FOR
14:38:50 2 SELECT lu.LNU_PARCEL_ID
14:38:50 3 FROM
14:38:50 4 seventy.PARCEL_OVERLAPS po,
14:38:50 5 imap_topol.TP$_PARCEL_AREAS pa,
14:38:50 6 TP$_PARCEL_CENTROID_AREA pca,
14:38:50 7 TDCR_LAND_UNIT lu
14:38:50 8 WHERE
14:38:50 9 sdo_within_distance(pa.area,po.geometry,'distance=0')='TRUE' and
14:38:50 10 pa.delete_date is null and
14:38:50 11 Lu.LNU_LAND_UNIT_UNIQUE_NUM = pca.CENTROID_ID and
14:38:50 12 pa.AREA_ID = pca.AREA_ID and
14:38:50 13 pca.DELETE_DATE IS NULL and
14:38:50 14 pa.DELETE_DATE IS NULL;
is
Plan Table
| Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT | | 4G|32920G| 547M| | |
| NESTED LOOPS | | 4G|32920G| 547M| | |
| MERGE JOIN | | 547M| 2029G| 230124 | | |
| SORT JOIN | | 1M| 36M| 85014 | | |
| MERGE JOIN | | 1M| 36M| 50019 | | |
| SORT JOIN | | 1M| 17M| 21650 | | |
| TABLE ACCESS FULL |TP$_PARCE | 1M| 17M| 485 | | |
| SORT JOIN | | 1M| 22M| 28369 | | |
| TABLE ACCESS FULL |TDCR_LAND | 1M| 22M| 2127 | | |
| SORT JOIN | | 42K| 160M| 145111 | | |
| TABLE ACCESS FULL |TP$_PARCE | 42K| 160M| 12697 | | |
| TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
14:43:14 [email protected]:SQL> explain plan for
14:43:23 2 SELECT pa.AREA_ID
14:43:23 3 FROM seventy.PARCEL_OVERLAPS po,
14:43:23 4 imap_topol.TP$_PARCEL_AREAS pa
14:43:23 5 WHERE SDO_RELATE(po.geometry, pa.area,'mask=ANTINTERACT querytype=WINDOW') = 'TRUE'
14:43:23 6 and pa.DELETE_DATE IS NULL;
Plan Table
| Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT | | 6M| 50G| 10M| | |
| NESTED LOOPS | | 6M| 50G| 10M| | |
| TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
| TABLE ACCESS FULL |TP$_PARCE | 850K| 3G| 12697 | | |
14:45:03 [email protected]:SQL> explain plan for
14:45:04 2 SELECT pa.AREA_ID
14:45:05 3 FROM seventy.PARCEL_OVERLAPS po,
14:45:05 4 imap_topol.TP$_PARCEL_AREAS pa
14:45:05 5 WHERE SDO_RELATE(pa.area, po.geometry,'mask=ANTINTERACT querytype=WINDOW') = 'TRUE'
14:45:05 6 and pa.DELETE_DATE IS NULL;
Plan Table
| Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT | | 6M| 50G| 863554 | | |
| NESTED LOOPS | | 6M| 50G| 863554 | | |
| TABLE ACCESS FULL |TP$_PARCE | 850K| 3G| 12697 | | |
| TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
-------------------------------------------------------------------------------- -
Ora-03114 running a query with group by
Hi, I've a query with a group by on a sub-query, something like
SELECT <40+ fields>
FROM (SELECT <40+ fields>
FROM table
GROUP BY <40+ fields> I don't have any problem running this query directly via toad. This query is a cursor in a procedure in a package and, if I invoke it on the same data, the session crash "with ora-03114 not connected to oracle". If I modify the query selecting less fields, 22, I don't have any problem while with 23 the crash appears.
Furthermore, I don't have any problem in other databases with similar data.
The db version is 9.2.0.6.0 - 64bit
Any idea/advice?
Edited by: 912104 on 3-feb-2012 2.02
Edited by: 912104 on 3-feb-2012 2.03
Edited by: 912104 on 3-feb-2012 2.03912104 wrote:
I have difficult to have more information, I can only add:
select * from v$version
BANNER
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 ; Production
TNS for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Production Can I ask what do you think about the different behavior via toad and via package? I mean, it's possible that is a server bug?
Edited by: 912104 on 3-feb-2012 4.02Are you retrieving the entire result set via toad? or just the first few records?
Are there any TOAD non-fetched column values in your result set, i.e. CLOBS, XMLTypes, nested types?
What does your code do with the cursor? Presumably you don't loop through it and do nothing. Are you sure it's the select that's causing the error, or something you are doing with the data in the procedure?
Can you not adding some instrumentation to your code so that you know exactly what line/data values are processed at the time of the crash? Does it always crash on the same values/line or does it vary?
"Furthermore, I don't have any problem in other databases with similar data." ... what do you mean by "similar data". You only need one odd value in one column to cause you a 3114 in the right circumstances. It seems like you are long way off establishing what exactly the problem is. It's always useful not to close doors to lines of thought. You need to systematically track down the root cause of the issue by exclusion and assumptions are the enemy of that process. -
Hello, I have this problem,
I use php for read data from oracle table,
all works right, I have any problem whith varchar number type data, but when I must read geometry data like
(type MDSYS.SDO_GEOMETRY)
I can't display it on the web page.
esemple of spatial query that I use:
select GEOMETRY_1
from table_a
where
ID = 970;
If I use sql plus I have this result
SDO_GEOMETRY(3001, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 0, 6000, 4, 1, 1), SDO_ORDINATE_ARRAY(1, -0, -
0, 580094, 4998494, -1))
but blank page when I use php sentence.
I use PHP Version 4.4.0
modules load are:
extension=php_sdo.dll
extension=php_oci8.dll
But I don't know which other module I need and also which php function to use for read array of array. at the moment I use @OCIFetchInto.
Someone can help me?
My English is very bad please reply easy.
Thanks for all!
AngeloThank you very much CJ.
Now there isn't any problems: you and this link (Re: PHP and spatial data and Adamo Bozzetti helped me
I have used SDO_UTIL.GETVERTICES
my complete php script is:
$conn = @OCILogon("xxxxxx", "xxxxx", "xxxxx") or die
( "Non riesco a connettermi al server $host ");
$query = "select
TABLE_A.tipo_via,
TABLE_A.nome_via,
c.codice_via,
t.X,
t.Y
from TABLE B c, TABLE_A , TABLE(SDO_UTIL.GETVERTICES(c.geometry1)) t
where c.codice_via = 830
and c.codice_via = TABLE_A.id_via
$istruzione = @OCIParse($conn, $query);
@OCIExecute($istruzione);
$nrows = @OCIFetchInto($istruzione, $results);
$trovati = 0;
while(@OCIFetchInto($istruzione, $results))
$trovati++;
?>
<table border width="800" >
<tr>
<td align="center" width="80" bgcolor ="#aaffee"><?echo trim($results[0]);?></td>
<td align="center" width="150" bgcolor ="#eeffee"><?echo trim($results[1]);?></td>
<td align="center" width="50" bgcolor ="#eeffee"><?echo trim($results[2]);?></td>
<td align="center" width="50" bgcolor ="#eeffee"><?echo trim($results[3]);?></td>
<td align="center" width="50" bgcolor ="#eeffee"><?echo trim($results[4]);?></td>
</tr>
</table>
<?
} //fine While
@OCIFreeStatement($istruzione);
@OCILogOff($conn); -
Spatial query with sdo_aggregate_union taking too much time
Hello friends,
the following query taking too much time for execution.
table1 contains around 2000 records.
table2 contains 124 rows
SELECT
table1.id
, table1.txt
, table1.id2
, table1.acti
, table1.acti
, table1.geom as geom
FROM
table1
WHERE
sdo_relate
table1.geom,
select sdo_aggr_union(sdoaggrtype(geom, 0.0005))
from table2
,'mask=(ANYINTERACT) querytype=window'
)='TRUE'
I am new in spatial. trying to find out list of geometry which is fall within geometry stored in table2.
ThanksHi Thanks lot for your reply.
But It is not require to use sdo_aggregate function to find out whether geomatry in one table is in other geomatry..
Let me give you clear picture....
What I trying to do is, tale1 contains list of all station (station information) of state and table2 contains list of area of city. So I want to find out station which is belonging to city.
For this I thought to get aggregation union of city area and then check for any interaction of that final aggregation result with station geometry to check whether it is in city or not.
I hope this would help you to understand my query.
Thanks
I appreciate your efforts. -
ORA-21700 Error when running C# stored procedure to do a spatial query
Hi All
I'm having trouble running a C# stored procedure that (via another object) that falls over running a spatial query with the following error.
OAR-21700 object does not exist or is marked for delete
If I take the sql of the spatial query out and run it separately in SqlPlus it runs as expected.
If I use the object that executes the spatial query via NUnit (i.e. executed on the client, rather than the server) it also works as expected.
Can anyone help? Is there some issue using Oracle Spatial queries with the Oracle Database Extensions for .NET?I can indeed. Here is a slightly simplified version:
SELECT secondary_catch.mi_prinx AS primarykey
FROM mapinfo_data.secondary_catch
WHERE sdo_relate (secondary_catch.geoloc,
(SELECT geoloc
FROM training_6.building_polygons
WHERE building_id = 10002507117),
'mask=anyinteract querytype=WINDOW'
) = 'TRUE'
Interestingly, if I attempt to run this query inside a C# stored procedure using the implicit context connection (i.e. OracleConnection.ConnectionString = "context connection=true") it fails with the error I described above.
If however I create a new connection and connect as a regular user on my database, the query works correctly.
So in that sense I have a workaround, but I'd like to avoid using it if I can as creating a new explicit connection is an overhead I can do without. -
Why do i get ORA-03113 when doing a spatial query against union all view?
Hi, i created the following view
CREATE OR REPLACE FORCE VIEW cola_markets_v
AS
(SELECT mkt_id, NAME, shape shape_a, NULL shape_b, NULL shape_c,
NULL shape_d
FROM COLA_MARKETS
WHERE NAME = 'cola_a')
UNION ALL
(SELECT mkt_id, NAME, NULL shape_a, shape shape_b, NULL shape_c,
NULL shape_d
FROM COLA_MARKETS
WHERE NAME = 'cola_b')
UNION ALL
(SELECT mkt_id, NAME, NULL shape_a, NULL shape_b, shape shape_c,
NULL shape_d
FROM COLA_MARKETS
WHERE NAME = 'cola_c')
UNION ALL
(SELECT mkt_id, NAME, NULL shape_a, NULL shape_b, NULL shape_c,
shape shape_d
FROM COLA_MARKETS
WHERE NAME = 'cola_d');added the necessary entries in USER_SDO_GEOM_METADATA and created a spatial index on COLA_MARKETS (SHAPE). However, when i do a spatial query against this view, i get ORA-03113. A spatial query against the base table works fine. Any ideas why this happens? (This is Oracle 10.2.0.3.0)
Thanks in advance, Markus
PS: This is my spatial query
SELECT *
FROM cola_markets_v t
WHERE sdo_filter (t.shape_a,
SDO_GEOMETRY (2003,
NULL,
NULL,
sdo_elem_info_array (1, 1003, 3),
sdo_ordinate_array (1, 1, 2, 2)
'querytype=window'
) = 'TRUE';Thank you for your reply. I have tried it with 11.1.0.6.0 today and it works. This might be an issue with 10.2.0.3.0.
-
ORA-03113 WITH CREATION OF A SPATIAL INDEX
Hello,
the creation of a spatial index with 11G database interrupts with:
ORA-03113 end-of-file on communication channel.
The table contains only point data, but has over 3.000.000 data records.
Has anyone an idea what to do?
AnnaAnna,
A couple of questions.
1 Does this happen all the time?
2 Can you select from table consistently?
3 How long does it take from issuing the command to getting the error?
The error is indicating a network timeout or similar.
Regards.
Ivan -
Simple Spatial Query caused ORA-03113: end-of-file on communication channel
I try to run a simple spatial query to find the ID's which inside the specified circle
select n.ID,n.FEATURE_ID
from NC_MANGROVE n
where sdo_relate(n.shape,
mdsys.sdo_geometry(2003,null,null,
mdsys.sdo_elem_info_array(1,1003,4),
mdsys.sdo_ordinate_array(848948,834940,848908,834980,848908,834900)),
'mask=ANYINTERACT querytype=WINDOW')='TRUE';
but it end up of ORA-03113: end-of-file on communication channel
Then I try another query, which I think do the similar thing
select n.ID,n.FEATURE_ID
from NC_MANGROVE n
where sdo_within_distance(n.shape,
mdsys.sdo_geometry(2001,null,mdsys.sdo_point_type(848908,834900,null),null,null),
'distance=40')='TRUE';
but same error occurs.
Is it the SQL*net configure problem. I am using Oracle 8.1.7 for both client and server.
Please help
TommyDoes SDO_FILETER Queries work fine? If so there is already reported bug and patch for that on Metalink site. Get all the patches for 8.17 spatial and install those.
-
ORA-03113: end-of-file on communication channel while executing a query
Hi all,
I am getting following error while executing one of the query.
ORA-03113: end-of-file on communication channel
The query involves subqueries. At one point, in the second last condition of the whole query is the cause. what makes the query to disconnect from database.
I am pasting the whole query with highlighted part causing the error.
select
A.Num_Employee_Id as col_0_0_,
A.Str_Name_For_Reports as col_1_0_
from
Est_Esb_employee_m A
where
A.num_office_id=1
and A.Num_Employee_Id not in
(select
B.Num_Employee_Id
from
Est_Esb_Employee_Service_D B
where
B.Chr_Curr_Status='N'
and
B.Dat_Effective_Date is not null
and
B.Dat_Effective_Date=
(select
max(C.Dat_Effective_Date)
from
Est_Esb_Employee_Service_D C
where
C.Num_Employee_Id=B.Num_Employee_Id
and C.Dat_Effective_Date is not null
and B.Num_Transaction_Id=
(select
max(D.Num_Transaction_Id)
from
Est_Esb_Employee_Service_D D
where
D.Dat_Effective_Date=
(select
max(E.Dat_Effective_Date)
from
Est_Esb_Employee_Service_D E
where
Num_Employee_Id=D.Num_Employee_Id
and D.Num_Employee_Id=B.Num_Employee_Id
and B.Num_New_Office_Id=1
order by
A.Str_First_Name,
A.Str_Middle_Name,
A.Str_Last_Name
Awaiting your valuable suggestions.
Regards
Vijay KumarI would start by compareing the explain plan of both versions of the statement.
Also by adding such a restriction you might change from an uncorrelated subquery to a correlated subquery. I'm not sure, because your code is hardly readably without formatting.
In any case you seem to select again and again from the same table. Maybe you should find a way to optimize to query in terms of io (less table access). Then this problem could go away. -
ORA-03113 : end-of-file on communication channel while running a SQL Query
Hi,
While executing the following query, we are facing ORA-03113 : EOF on communication channel error.
SELECT
FROM QDF_CLSS_SHENG_HIST
/*WHERE* a.FACT_TYPE_CODE='BS'
AND */
WHERE (SRCE_SYS_ID = 850 OR (SRCE_SYS_ID IN (1747,1764) AND GEO_ID IN (826,372) AND PRTTN_BY_FUNC_DATE>=to_date('20060701','YYYYMMDD') ))
When we remove one of the values in the SRCE_SYS_ID's 'IN' condition the error is not thrown, e.g.
WHERE (SRCE_SYS_ID = 850 OR (SRCE_SYS_ID IN (1747) AND GEO_ID IN (826,372) AND PRTTN_BY_FUNC_DATE>=to_date('20060701','YYYYMMDD') ))
The version of the Database we are using is 10.2.0.3.0 - 64bi. Is this a common error in this version of the database because when we ran the same query in a 9i database we got no such error.
P.S : QDF_CLSS_SHENG_HIST table is partitioned on SRCE_SYS_ID and PRTTN_BY_FUNC_DATE
Thanks,
PuneethYes, we get the same error and no dumps are getting created.It might be interesting to look at a trace file for this SQL statement with event 10046 at level 12 and event 10053 at level 1 enabled for the session. You may need to modify the query slightly to make certain that a hard parse is required (possibly by specifying a couple of the column names to be returned rather than *). Take a look through the raw trace file for something like this
cost: -1.#IND card: 1.#INFThere is at least one query in the ERP package that I use that will output the following in a 10053 trace when optimizer_features_enable is greater than 10.1.0.4, followed by an ORA-600:
Access Path: index (AllEqUnique)
Index: SYS_C004588
resc_io: 1.00 resc_cpu: 8341
ix_sel: 0.5 ix_sel_with_filters: 0.5
NL Join: Cost: 1.#J Resp: 1.#J Degree: 1
Cost_io: 1.#J Cost_cpu: 1
Resp_io: 1.#J Resp_cpu: 1
Best NL cost: 1797693134862315700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000.00
resc: 3.01 resc_io: 3.00 resc_cpu: 35947
resp: 3.01 resp_io: 3.00 resp_cpu: 35947
Outer Join Card: 1.#J = max ( outer (1.#J), (outer (1.#J) * inner (2.00) * sel (0.5) )
Join Card - Rounded: 1 Computed: 1.#JYou may be experiencing a similar problem that might become evident with both trace events enabled.
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
InterMedia Text with USER_DATASTORE and ORA-03113
Hi,
I have problems using Oracle's InterMedia Text-index with a
USER_DATASTORE. I'm using Oracle 8.1.7 on Windows NT 4.0.
What I try to do is to create a context-index on multiple columns
of multiple tables. I created a table containing the original
tablenames and primary keys plus a char(1)-column to index, a
user_datastore, a procedure in a user-schema, a
wrapping-procedure in ctxsys' schema and finally the index. All
works fine so far but I get an ORA-03113 "end-of-file on
communication channel" error when querying the table with
contains. The procedure itself works.
Here's what I tried in detail:
I created a table "alldocs" containing the tablename and
primary-key-value of each line of each table plus a dummy-column
for the index:
create table alldocs(
table varchar2(30) not null,
id number not null,
data char(1),
primary key(tabelle, id)
I filled this table:
insert into alldocs (select 'MYDOCS', id, 'a' from mydocs);
insert into alldocs (select 'OTHERDOCS', id, 'b' from otherdocs);
The user's procedure - only dummy for testing - is:
create procedure test.GetAllDocsData(row IN ROWID, data IN OUT
NOCOPY CLOB) IS
tabname varchar2(30);
myid number;
tmpclob clob;
begin
dbms_lob.createtemporary(tmpclob, TRUE);
dbms_lob.writeappend(tmpclob, 34, 'Ein Text mit ca. 20
Zeichen Ldnge.');
data := tmpclob;
end;
In ctxsys' schema I defined the following procedure and the
datastore:
create or replace procedure sysGetAllDocsData(rid in rowid, tlob
in out clob) is
begin
test.GetAllDocsData(rid, tlob);
end sysGetAllDocsData;
grant execute on sysGetAllDocsData to test;
call ctx_ddl.create_preference('MyUserDS', 'user_datastore');
call ctx_ddl.set_attribute('MyUserDS', 'procedure',
'sysGetAllDocsData');
call ctx_ddl.set_attribute('MyUserDS', 'output_type', 'CLOB');
Finally I defined the index:
create index test.alldocs_ctx on test.alldocs(data)
indextype is ctxsys.context
parameters ('DATASTORE CTXSYS.MyUserDS FILTER
CTXSYS.INSO_FILTER LEXER BASIC_LEXER');
This all works without errors. But when querying like this:
select * from test.alldocs where contains('data', 'Text')>0
the answer is
ORA-03113: end-of-file on communication channel
I hope someone can help.
Greetings
RalfHi Ralf,
please define first your own preferences like this:
exec CTX_DDL.drop_preference('MY_LEXER');
exec CTX_DDL.create_preference('MY_LEXER','BASIC_LEXER');
exec CTX_DDL.set_attribute('MY_LEXER','ALTERNATE_SPELLING',
'GERMAN');
exec CTX_DDL.set_attribute('MY_LEXER','BASE_LETTER','YES');
exec CTX_DDL.set_attribute('MY_LEXER','MIXED_CASE', 'NO');
exec CTX_DDL.set_attribute('MY_LEXER','INDEX_THEMES','NO');
exec CTX_DDL.set_attribute('MY_LEXER','INDEX_TEXT', 'YES');
exec CTX_DDL.set_attribute('MY_LEXER','COMPOSITE', 'GERMAN');
exec ctx_ddl.Drop_Preference ('MY_FILTER');
exec ctx_ddl.Create_Preference ('MY_FILTER','NULL_FILTER');
exec ctx_ddl.drop_section_group ('MY_SECTION');
exec ctx_ddl.create_section_group
('MY_SECTION','NULL_SECTION_GROUP');
and then create your index with this preferences. You only need
an INSO filter if you want to index pdf,word,...
create index test.alldocs_ctx on test.alldocs(data)
indextype is ctxsys.context
parameters ('DATASTORE CTXSYS.MyUserDS FILTER
CTXSYS.INSO_FILTER LEXER BASIC_LEXER');create index test.alldocs_ctx on test.alldocs(data)
indextype is ctxsys.context
parameters ('
DATASTORE CTXSYS.MyUserDS
lexer MY_LEXER
filter MY_FILTER
section group MY_SECTION');
Then see in the token table what tokens are in the index:
select token_text from dr$alldocs_ctx$i;
If you got also an ORA-3113 see in alert.log if there is a trace
referenced with this error and have a look in this file to find a
better error message.
Good luck.
Thomas -
Export with embedded spatial query
I am trying to use the exp utility to export spatial data. I am using the "query" parameter to specify a spatial query based on another spatial layer.
I have two layers. Admin1 has lots of administrative boundaries. PE has three polygons in it over different sections of my data set. I want to get the data extracted from admin1 that exists in these areas to an export file(along with all the triggers and other related database objects). I was hoping this approach would work
I am getting errors saying that the identifier is too long.
Here is the par file:
file=1.exp
log=1.log
tables=(admin1, pe)
query="""WHERE mdsys.SDO_RELATE(GEOM1,pe.GEOM, 'MASK=INSIDE QUERYTYPE=WINDOW')='TRUE' OR SDO_RELATE(GEOM2,pe.GEOM, 'MASK=INSIDE QUERYTYPE=WINDOW')='TRUE'"""
I get:
Export: Release 10.2.0.1.0 - Production on Wed May 10 11:56:14 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table ADMIN1
EXP-00056: ORACLE error 972 encountered
ORA-00972: identifier is too long
. . exporting table PE
EXP-00056: ORACLE error 972 encountered
ORA-00972: identifier is too long
Export terminated successfully with warnings.
Is this even possible? Can you use the exp query parameter to perform a spatial operation? Did this work? I am accustom to seeing record counts next to the exported tables, and they are not present in the output from exp. The export file is not empty. It exported all the features, not the subset I had requested.
How can I structure the query differently so that I get the export file with just the lines that fall within the polygons?
Thanks,
JohnI am trying to use the exp utility to export spatial data. I am using the "query" parameter to specify a spatial query based on another spatial layer.
I have two layers. Admin1 has lots of administrative boundaries. PE has three polygons in it over different sections of my data set. I want to get the data extracted from admin1 that exists in these areas to an export file(along with all the triggers and other related database objects). I was hoping this approach would work
I am getting errors saying that the identifier is too long.
Here is the par file:
file=1.exp
log=1.log
tables=(admin1, pe)
query="""WHERE mdsys.SDO_RELATE(GEOM1,pe.GEOM, 'MASK=INSIDE QUERYTYPE=WINDOW')='TRUE' OR SDO_RELATE(GEOM2,pe.GEOM, 'MASK=INSIDE QUERYTYPE=WINDOW')='TRUE'"""
I get:
Export: Release 10.2.0.1.0 - Production on Wed May 10 11:56:14 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table ADMIN1
EXP-00056: ORACLE error 972 encountered
ORA-00972: identifier is too long
. . exporting table PE
EXP-00056: ORACLE error 972 encountered
ORA-00972: identifier is too long
Export terminated successfully with warnings.
Is this even possible? Can you use the exp query parameter to perform a spatial operation? Did this work? I am accustom to seeing record counts next to the exported tables, and they are not present in the output from exp. The export file is not empty. It exported all the features, not the subset I had requested.
How can I structure the query differently so that I get the export file with just the lines that fall within the polygons?
Thanks,
John -
Problems with basic spatial query
I'm trying to learn Oracle Spatial working with 11g R2 and with 3D georeferenced data (specifically data describing buildings in a city).
But I'm having trouble getting a basic query to work on my dataset (it works for the book example), and I'm trying to do it exactly the way it's done in the Spatial Developer's Guide for 11g.
To learn how spatial queries work, I set up the cola_markets tables used in the documentation, made the appropriate manual entry in the user_sdo_geom_metadata view and created the index. Having done that, I can run the following simple query (as well as the others in the manual) on the book tables:
SELECT SDO_GEOM.SDO_DISTANCE(c_b.shape, c_d.shape, 0.005)
FROM cola_markets c_b, cola_markets c_d
WHERE c_b.name = 'cola_b' AND c_d.name = 'cola_d';
but when I try to do the same thing on my own tables (created from citygml data), I get an error. There is the difference that the data is 3D, and the index was created without any PARAMETERS ( ... ), hence is just 2D. But still I don't get why the following query doesn't work:
SELECT SDO_GEOM.SDO_DISTANCE(c_w.envelope, c_b.envelope, 0.0005)
FROM cityobject c_w,
cityobject c_b
WHERE c_w.id = 50025
AND c_b.id = 50018;
The id's for the buildings are valid, and I used the same tolerance used by the software that set up the database.
Here's the error I get in SQL developer:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.Exception: 54535
ORA-06512: at "MDSYS.SDO_3GL", line 637
ORA-06512: at "MDSYS.SDO_GEOM", line 1973
ORA-06512: at "MDSYS.SDO_GEOM", line 1990
29532. 00000 - "Java call terminated by uncaught Java exception: %s"
*Cause: A Java exception or error was signaled and could not be
resolved by the Java code.
*Action: Modify Java code, if this behavior is not intended.
So, thinking it might have something to do with the fact that it's a Java interface, I also tried running it from SQL/PL command line and get essentially the same thing:
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.Exception: 54535
ORA-06512: at "MDSYS.SDO_3GL", line 637
ORA-06512: at "MDSYS.SDO_GEOM", line 1973
ORA-06512: at "MDSYS.SDO_GEOM", line 1990
Any ideas why this isn't working?Hi,-
There are many ways to model a building with our open 3D data model:
Please note that each polygon can be any planar surface as long as you dont use
shortcut definitions like axis-aligned box as Siva mentioned. We dont allow curved surfaces in 3D.
Gtype 3003 can be composite surface which means each polygon should be connected to another polygon with an edge. Etype must be then 1006. You can have as many polygons as possible as long as they are connected.
Gtype 3003 can also be a single polygon. But, this will not be able to model a building.
As you pointed out, maybe it is the footprint of the building.
You can also model building with gtype 3008 which is simple or composite solid.
Etype 1007 means it is simple solid and etype 1008 means it is composite solid.
Composite solid has one or more solids which has at least one full or partial common surface in between.
In your case with single polygon, you can use sdo_util.extrude as follows to make
3D buildings. The surfaces created will be on the out-side surface of the building.
You will not have walls inside the building when you use this following function:
SELECT SDO_UTIL.EXTRUDE(
SDO_GEOMETRY(
2003,
null,
null,
SDO_ELEM_INFO_ARRAY(1,1003,1),
SDO_ORDINATE_ARRAY(5, 1,8,1,8,6,5,7,5,1)),
SDO_NUMBER_ARRAY(0,0,0,0,0),
SDO_NUMBER_ARRAY(5,10,10,5,5),
0.005) from dual;
SDO_UTIL.EXTRUDE(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_O
SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1007, 1, 1, 1006, 6, 1, 10
03, 1, 16, 1003, 1, 31, 1003, 1, 46, 1003, 1, 61, 1003, 1, 76, 1003, 1), SDO_ORD
INATE_ARRAY(5, 1, 0, 5, 7, 0, 8, 6, 0, 8, 1, 0, 5, 1, 0, 5, 1, 5, 8, 1, 10, 8, 6
, 10, 5, 7, 5, 5, 1, 5, 5, 1, 0, 8, 1, 0, 8, 1, 10, 5, 1, 5, 5, 1, 0, 8, 1, 0, 8
, 6, 0, 8, 6, 10, 8, 1, 10, 8, 1, 0, 8, 6, 0, 5, 7, 0, 5, 7, 5, 8, 6, 10, 8, 6,
0, 5, 7, 0, 5, 1, 0, 5, 1, 5, 5, 7, 5, 5, 7, 0))
The following example returns the three-dimensional composite solid geometry representing an extrusion from a two-dimensional polygon geometry with inner rings.
SELECT SDO_UTIL.EXTRUDE(
SDO_GEOMETRY(
2003,
null,
null,
SDO_ELEM_INFO_ARRAY(1, 1003, 1, 11, 2003, 1,
21, 2003,1, 31,2003,1, 41, 2003, 1),
SDO_ORDINATE_ARRAY(0,0, 8,0, 8,8, 0,8, 0,0,
1,3, 1,4, 2,4, 2,3, 1,3, 1,1, 1,2, 2,2, 2,1, 1,1,
1,6, 1,7, 2,7, 2,6, 1,6, 3,2, 3,4, 4,4, 4,2, 3,2)),
SDO_NUMBER_ARRAY(-1.0),
SDO_NUMBER_ARRAY(1.0),
0.0001) from dual;
SDO_UTIL.EXTRUDE(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1,11,200
SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1008, 4, 1, 1007, 1, 1, 10
06, 16, 1, 1003, 1, 46, 1003, 1, 91, 1003, 1, 106, 1003, 1, 121, 1003, 1, 136, 1
003, 1, 151, 1003, 1, 166, 1003, 1, 181, 1003, 1, 196, 1003, 1, 211, 1003, 1, 22
6, 1003, 1, 241, 1003, 1, 256, 1003, 1, 271, 1003, 1, 286, 1003, 1, 301, 1007, 1
, 301, 1006, 10, 301, 1003, 1, 328, 1003, 1, 355, 1003, 1, 370, 1003, 1, 385, 10
03, 1, 400, 1003, 1, 415, 1003, 1, 430, 1003, 1, 445, 1003, 1, 460, 1003, 1, 475
, 1007, 1, 475, 1006, 6, 475, 1003, 1, 490, 1003, 1, 505, 1003, 1, 520, 1003, 1,
535, 1003, 1, 550, 1003, 1, 565, 1007, 1, 565, 1006, 10, 565, 1003, 1, 592, 100
3, 1, 619, 1003, 1, 634, 1003, 1, 649, 1003, 1, 664, 1003, 1, 679, 1003, 1, 694,
1003, 1, 709, 1003, 1, 724, 1003, 1), SDO_ORDINATE_ARRAY(4, 0, -1, 4, 2, -1, 4,
4, -1, 3, 4, -1, 2, 4, -1, 2, 7, -1, 1, 7, -1, 1, 6, -1, 1, 4, -1, 1, 3, -1, 0,
3, -1, 0, 8, -1, 8, 8, -1, 8, 0, -1, 4, 0, -1, 4, 0, 1, 8, 0, 1, 8, 8, 1, 0, 8,
1, 0, 3, 1, 1, 3, 1, 1, 4, 1, 1, 6, 1, 1, 7, 1, 2, 7, 1, 2, 4, 1, 3, 4, 1, 4, 4
, 1, 4, 2, 1, 4, 0, 1, 4, 0, -1, 8, 0, -1, 8, 0, 1, 4, 0, 1, 4, 0, -1, 8, 0, -1,
8, 8, -1, 8, 8, 1, 8, 0, 1, 8, 0, -1, 8, 8, -1, 0, 8, -1, 0, 8, 1, 8, 8, 1, 8,
8, -1, 0, 8, -1, 0, 3, -1, 0, 3, 1, 0, 8, 1, 0, 8, -1, 0, 3, -1, 1, 3, -1, 1, 3,
1, 0, 3, 1, 0, 3, -1, 1, 3, -1, 1, 4, -1, 1, 4, 1, 1, 3, 1, 1, 3, -1, 1, 4, -1,
1, 6, -1, 1, 6, 1, 1, 4, 1, 1, 4, -1, 1, 6, -1, 1, 7, -1, 1, 7, 1, 1, 6, 1, 1,
6, -1, 1, 7, -1, 2, 7, -1, 2, 7, 1, 1, 7, 1, 1, 7, -1, 2, 7, -1, 2, 4, -1, 2, 4,
1, 2, 7, 1, 2, 7, -1, 2, 4, -1, 3, 4, -1, 3, 4, 1, 2, 4, 1, 2, 4, -1, 3, 4, -1,
4, 4, -1, 4, 4, 1, 3, 4, 1, 3, 4, -1, 4, 4, -1, 4, 2, -1, 4, 2, 1, 4, 4, 1, 4,
4, -1, 4, 2, -1, 4, 0, -1, 4, 0, 1, 4, 2, 1, 4, 2, -1, 0, 3, -1, 1, 3, -1, 1, 1,
-1, 2, 1, -1, 3, 2, -1, 4, 2, -1, 4, 0, -1, 0, 0, -1, 0, 3, -1, 0, 3, 1, 0, 0,
1, 4, 0, 1, 4, 2, 1, 3, 2, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 0, 3, 1, 0, 3, -1, 0, 0
, -1, 0, 0, 1, 0, 3, 1, 0, 3, -1, 0, 0, -1, 4, 0, -1, 4, 0, 1, 0, 0, 1, 0, 0, -1
, 4, 0, -1, 4, 2, -1, 4, 2, 1, 4, 0, 1, 4, 0, -1, 4, 2, -1, 3, 2, -1, 3, 2, 1, 4
, 2, 1, 4, 2, -1, 3, 2, -1, 2, 1, -1, 2, 1, 1, 3, 2, 1, 3, 2, -1, 2, 1, -1, 1, 1
, -1, 1, 1, 1, 2, 1, 1, 2, 1, -1, 1, 1, -1, 1, 3, -1, 1, 3, 1, 1, 1, 1, 1, 1, -1
, 1, 3, -1, 0, 3, -1, 0, 3, 1, 1, 3, 1, 1, 3, -1, 1, 6, -1, 2, 6, -1, 2, 4, -1,
1, 4, -1, 1, 6, -1, 1, 6, 1, 1, 4, 1, 2, 4, 1, 2, 6, 1, 1, 6, 1, 1, 6, -1, 1, 4,
-1, 1, 4, 1, 1, 6, 1, 1, 6, -1, 1, 4, -1, 2, 4, -1, 2, 4, 1, 1, 4, 1, 1, 4, -1,
2, 4, -1, 2, 6, -1, 2, 6, 1, 2, 4, 1, 2, 4, -1, 2, 6, -1, 1, 6, -1, 1, 6, 1, 2,
6, 1, 2, 6, -1, 1, 3, -1, 2, 3, -1, 2, 4, -1, 3, 4, -1, 3, 2, -1, 2, 1, -1, 2,
2, -1, 1, 2, -1, 1, 3, -1, 1, 3, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 3, 2, 1, 3, 4, 1,
2, 4, 1, 2, 3, 1, 1, 3, 1, 1, 3, -1, 1, 2, -1, 1, 2, 1, 1, 3, 1, 1, 3, -1, 1, 2
, -1, 2, 2, -1, 2, 2, 1, 1, 2, 1, 1, 2, -1, 2, 2, -1, 2, 1, -1, 2, 1, 1, 2, 2, 1
, 2, 2, -1, 2, 1, -1, 3, 2, -1, 3, 2, 1, 2, 1, 1, 2, 1, -1, 3, 2, -1, 3, 4, -1,
3, 4, 1, 3, 2, 1, 3, 2, -1, 3, 4, -1, 2, 4, -1, 2, 4, 1, 3, 4, 1, 3, 4, -1, 2, 4
, -1, 2, 3, -1, 2, 3, 1, 2, 4, 1, 2, 4, -1, 2, 3, -1, 1, 3, -1, 1, 3, 1, 2, 3, 1
, 2, 3, -1))These are examples from Spatial User's Guide.
ORA-54668 means that you need to update your srid to a 3D srid.
Please check out Spatial User's Guide, Pro Oracle Spatial for 11g book and
the following paper (which we can send you a copy offline)
B. M. Kazar, R. Kothuri, P. v. Oosterom and S. Ravada, "On Valid and Invalid Three-
Dimensional Geometries", 2nd International Workshop on 3D Geo-Information: Requirements, Acquisition,
Modelling, Analysis, Visualisation, 12-14 December 2007, Delft, the Netherlands (Published as Chapter 2,
pp. 19-46 in Advances in 3D Geoinformation Systems Series: Lecture Notes in Geoinformation and
Cartography Oosterom, P.v.; Zlatanova, S.; Penninga, F.; Fendel, E. (Eds.) 2008, XX, 441 p. 235 illus.,
Hardcover ISBN: 978-3-540-72134-5
Maybe if you can post here an example geometry from your data,
we can help you more.
Hope these help.
Thanks
Maybe you are looking for
-
Linking to a specific section of a page [was: Dreamweaver noob question]
Hello everyone, I am rather new to dreamweaver and am required to use it at work to update the company website. Long story short we have a list of databases. In this list of databases there are several subsections, for instance. Automotive,Governm
-
I have a requirement to generate a Time Series Graph based on 3 tables: Time Series containing Period ID Costs containing Period ID and Project, Activity Project containing Project Data. The structure is: Period -----< Costs >------- Project With Per
-
RetrieveBinaryObjectUsageCommand not working
Hi Experts, I am trying to get the usage of Binary Object via the below code but unfortunately the command is not getting executed. Can some one please advise or help me in this. try{ RetrieveBinaryObjectUsageCommand retrieveBinaryObjectUsageComma
-
windows 7 laptop cant see memory sticks on my HP 7410 Printer
-
I downloaded the new update update (iOS 5) for my iPhone 4 a few weeks back and everything was running smoothly for about 3 days. Then all of a sudden I couldn't make/receive call or send/receive text messages. I thought it may be a temporary problem