ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PASSTHRU db call generating error not seen in SQLPlus

Post new topic  Reply to topic
 PASSTHRU db call generating error not seen in SQLPlus « View previous topic :: View next topic » 
Author Message
mattynorm
PostPosted: Thu Feb 25, 2010 2:33 am    Post subject: PASSTHRU db call generating error not seen in SQLPlus Reply with quote

Acolyte

Joined: 06 Jun 2003
Posts: 52

I'm using the following statement to return data from an Oracle database

SET Environment.Variables.Prices[] = PASSTHRU('SELECT TO_CHAR(A.FIELD1) FIELD1,
A.FIELD2,
TO_CHAR(A.FIELD3) FIELD3,
B.FIELD4

FROM SCHEMA1.VIEW1 A
LEFT OUTER JOIN
SCHEMA1.VIEW2 B
ON TO_CHAR(A.FIELD1) = B.FIELD5');


Running this sql in Toad (and the DBA's tell me, in SQL Plus) works fine and returns 2000-odd rows. However running it from within the message flow returns an Oracle error of 'ORA-01002: fetch out of sequence'.

Any idea why this would happen? My understanding of PASSTHRU was that it just passed the string to the database as is, so I don't understand why this would fail in WMB but work quite happily in TOAD, and the DBA's aren't being particularly helpful as they can't see a problem with the statement itself

Message Broker version is 6103, and the relevant stanza in odbc64.ini is

[DATABASE1]
Driver=/opt/wmb61/ODBC64/V5.3/lib/UKora23.so
Description=DataDirect 5.3 64bit Oracle Wire Protocol
HostName=localhost
PortNumber=1111
SID=DBSID
CatalogOptions=0
EnableStaticCursorsForLongData=0
ApplicationUsingThreads=1
EnableDescribeParam=1
OptimizePrepare=1
WorkArounds=536870912
ProcedureRetResults=1
ColumnSizeAsCharacter=1
EnableTimestampWithTimeZone=1
Back to top
View user's profile Send private message
Gaya3
PostPosted: Thu Feb 25, 2010 5:12 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

are you using any other SQL statements to the same table before firing the below Select SQL

and make this attribute to 1 as shown below

EnableStaticCursorsForLongData=1

once you change it bounce the broker and give a try
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
mattynorm
PostPosted: Thu Feb 25, 2010 6:19 am    Post subject: Reply with quote

Acolyte

Joined: 06 Jun 2003
Posts: 52

Quote:
are you using any other SQL statements to the same table before firing the below Select SQL


In this flow this is the only sql statement

From what I can read about EnableStaticCursorsForLongData, that only affects columns of datatype LONG. There aren't any columns of that type on either of the 2 views (or the underlying tables). In the absence of anything else to try though, I'll give it a go.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PASSTHRU db call generating error not seen in SQLPlus
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.