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 » Accessing a remote DB

Post new topic  Reply to topic
 Accessing a remote DB « View previous topic :: View next topic » 
Author Message
Prasi
PostPosted: Mon Mar 19, 2012 10:07 pm    Post subject: Accessing a remote DB Reply with quote

Apprentice

Joined: 03 Aug 2011
Posts: 42

Hi,

I am getting below error when I am trying to access a remote DB. But with the same code it is working in other environments. The DB is a SQL server.

Code:
PASSTHRU('SELECT CALLFLOWID  FROM CONDITION_HEADER WHERE CONDITION_ID IN

   

               (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = 'SCHEME_CODE' AND VALUE =?) AND CONDITION_ID IN

   

               (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = 'CIF_TYPE'AND VALUE =?) AND CONDITION_ID IN

   

               (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = &apos;MINOR_FLAG&apos; AND VALUE =?)&apos;, SchmCode, CustType, MinorFlag);</Text></Insert><DatabaseException><File>/build/S700_P/src/DataFlowEngine/ImbOdbc.cpp</File><Line>349</Line><Function>ImbOdbcHandle::checkRcInner</Function><Type></Type><Name></Name><Label></Label><Catalog>BIPmsgs</Catalog><Severity>3</Severity><Number>2321</Number><Text>Root SQL exception</Text><Insert><Type>2</Type><Text>-1</Text></Insert><Insert><Type>14</Type><Text>libbipodbc.a(odbc.so)</Text></Insert><DatabaseException><File>/build/S700_P/src/DataFlowEngine/ImbOdbc.cpp</File><Line>518</Line><Function>ImbOdbcHandle::checkRcInner</Function><Type></Type><Name></Name><Label></Label><Catalog>BIPmsgs</Catalog><Severity>3</Severity><Number>2322</Number><Text>[b][b]Child SQL exception</Text><Insert><Type>5</Type><Text>20136</Text></Insert><Insert><Type>2</Type><Text>0</Text></Insert><Insert><Type>5</Type><Text>[IBM][ODBC SQL Server Driver]20136</Text></Insert></DatabaseException></DatabaseException[/b][/b]></RecoverableException></RecoverableException></ActualException>



Please help.
Back to top
View user's profile Send private message
adubya
PostPosted: Tue Mar 20, 2012 12:52 am    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

^^^ code tags help formatting when pasting in stuff like this
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Mar 20, 2012 4:27 am    Post subject: Re: Accessing a remote DB Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Prasi wrote:
I am getting below error when I am trying to access a remote DB. But with the same code it is working in other environments.


Then compare what's different about the configuration in the working environment & the non-working environment. A trace may help.

If it's the same code in both places it's clearly not a code issue.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 20, 2012 5:18 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ESQL has no knowledge of the fact that a given database is local or remote.

ESQL only has knowledge of the name of the DataSource Name.
Back to top
View user's profile Send private message
Prasi
PostPosted: Tue Mar 20, 2012 10:36 am    Post subject: Reply with quote

Apprentice

Joined: 03 Aug 2011
Posts: 42

I agree. I have checked the configurations and everything seems to be perfect. This happens only for SELECT query. UPDATE and INSERT queries are working.
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue Mar 20, 2012 11:11 am    Post subject: Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

Prasi wrote:
This happens only for SELECT query. UPDATE and INSERT queries are working.

Reduce your select (e.g. "select * from myTable"). Test & put things (from the where-clause) in "incrementally".
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
vishnurajnr
PostPosted: Tue Mar 20, 2012 7:24 pm    Post subject: Reply with quote

Centurion

Joined: 08 Aug 2011
Posts: 134
Location: Trivandrum

Suggest you to check the datatype of the column you are selecting and ensure it is a Broker supported data type.
Back to top
View user's profile Send private message Visit poster's website
rekarm01
PostPosted: Wed Mar 21, 2012 12:41 am    Post subject: Re: Accessing a remote DB Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Prasi wrote:
Code:
PASSTHRU(&apos;SELECT CALLFLOWID FROM CONDITION_HEADER
    WHERE CONDITION_ID IN (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = &apos;SCHEME_CODE&apos; AND VALUE =?)
      AND CONDITION_ID IN (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = &apos;CIF_TYPE&apos; AND VALUE =?)
      AND CONDITION_ID IN (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = &apos;MINOR_FLAG&apos; AND VALUE =?)&apos;,
    SchmCode, CustType, MinorFlag);

What does the actual PASSTHRU statement look like? Are there single quotes nested inside the PASSTHRU string?
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Wed Mar 21, 2012 12:56 am    Post subject: Re: Accessing a remote DB Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

rekarm01 wrote:
What does the actual PASSTHRU statement look like? Are there single quotes nested inside the PASSTHRU string?

I think that there is something wrong with your PASSTHRU-String... there also has been discussion before.
_________________
Just use REFERENCEs
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 » Accessing a remote DB
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.