Select to view content in your preferred language

db_stream_prepare_stmt::db_sda_prepare_stmt: OCIStmtPrepare Error (0).

923
2
12-13-2016 08:07 AM
EricLussier1
Emerging Contributor

Did someone ever get that kind of error ?

db_sda_prepare_stmt: Error parsing SQL statement: SELECT  V__2891.*  FROM (SELECT b.OBJECTID,b.FILENUMBER,b.CLIENTNAME,b.CLIENTADDRESS,b.GLOBALID  FROM NT_LIMS_COPY.LAND_Clients_T b WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM NT_LIMS_COPY.D2891 WHERE DELETED_AT
 IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id) AND SDE_STATE_ID = 0) UNION ALL SELECT a.OBJECTID,a.FILENUMBER,a.CLIENTNAME,a.CLIENTADDRESS,a.GLOBALID  FROM NT_LIMS_COPY.A2891 a,SDE.state_lineages SL WHE
RE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM NT_LIMS_COPY.D2891 WHERE DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id) AND SDE_STATE_ID > 0
) AND a.SDE_STATE_ID = SL.lineage_id AND SL.lineage_name = :source_lineage_name AND SL.lineage_id <= :source_state_id ) V__2891  WHERE (FILENUMBER = 'N2015F0001' and  CLIENTNAME = 'Peter's Expediting Ltd.').

db_stream_prepare_stmt::db_sda_prepare_stmt: OCIStmtPrepare Error (0).

Exception: Underlying DBMS error [Table_Name][STATE_ID = 2092]

Any help will be apreciated.

Thanks.

Tags (1)
0 Kudos
2 Replies
ChristianWells
Esri Regular Contributor

Hi Eric, the important part of this error is the "Error parsing SQL statement". With that in mind:

1. Does this versioned feature class have issues drawing?

2. Does it only occur when you apply the select clause (i.e. WHERE (FILENUMBER = 'N2015F0001' and  CLIENTNAME = 'Peter's Expediting Ltd.'))? Do other selections work?

3. Can you apply the bind variables from SQL Server and run the query via SSMS?

4. It seems to be pointing out 2092 as a bad state_id value, can you run the diagnose version metadata and diagnose version tables tools to see if any errors are found?

5. Is this unique to this version of the data? Or do all versions fail on the same query?

0 Kudos
EricLussier1
Emerging Contributor

Hi Christian,

Thanks for your reply.

1-I fact it is a versioned sde table that caused the issue. I’m able to see the record in ArcCatalog.

2-Not it does not occurred when I do a select with WHERE (FILENUMBER = 'N2015F0001' and CLIENTNAME = 'Peter's Expediting Ltd.') on the table

I cannot go further than that, but I have include our dba in the conversation, so he may contact you later on that topic.

Theory : I thinks there is something wrong with the table where the versions are stored, it is like if the reference has be lost.

Thanks Christian

0 Kudos