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 » Oracle hints in compute node

Post new topic  Reply to topic
 Oracle hints in compute node « View previous topic :: View next topic » 
Author Message
nab054371
PostPosted: Mon Jan 08, 2007 10:10 am    Post subject: Oracle hints in compute node Reply with quote

Disciple

Joined: 15 Nov 2006
Posts: 173

Has anyone used oracle hints inside of compute node,if yes how do i get it to work?

for example:

SET InputBody.test[]=(SELECT /*+ index(T,T_PK) */ * from Database.testname AS T)
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 08, 2007 10:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Any database specific commands have to be done using PASSTHRU, not SELECT.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
nab054371
PostPosted: Mon Jan 08, 2007 12:18 pm    Post subject: Reply with quote

Disciple

Joined: 15 Nov 2006
Posts: 173

Is this available in 6.0 only.I do not see it in 5.0?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 08, 2007 12:21 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

nab054371 wrote:
Is this available in 6.0 only.I do not see it in 5.0?


It's an ESQL statement. It's been available since 2.1.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
nab054371
PostPosted: Mon Jan 08, 2007 12:59 pm    Post subject: Reply with quote

Disciple

Joined: 15 Nov 2006
Posts: 173

Can I change datasourcename property dynamically on compute node in 5.0?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 08, 2007 1:04 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

no.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
nab054371
PostPosted: Mon Jan 08, 2007 1:18 pm    Post subject: Reply with quote

Disciple

Joined: 15 Nov 2006
Posts: 173

OK here's what I found with PASSTHRU in V5.0:


It does not let you have TO Database.<dbname> values('abc') in 5.0


Here's what I need to get working though:

DECLARE SCHEMANAME CHAR 'DEVELOPMENT';

set OutputRoot.XML.rsername = ('SELECT T.USERID from Database.{SCHEMANAME}.users where T.userid = 'abc');

It does not seem to recognize SCHEMANAME.How can I get this to work?
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jan 09, 2007 1:22 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

As Jeff said, use PASSTHRU
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
nab054371
PostPosted: Tue Jan 09, 2007 7:33 am    Post subject: Reply with quote

Disciple

Joined: 15 Nov 2006
Posts: 173

PASSTHRU does not work.Here's what it does:

PASSTHRU('SELECT * from Database.{SCHEMANAME}.testtbl')

It does nto do any subsitituion for SCHEMANAME.
In otherwords the sql query when it gets to Oracle looks something like this:

'SELECT * from Database.{SCHEMANAME}.testtbl

Resulting in Oracle exception.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 09, 2007 7:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You're correct. PASSTHRU does not do any ESQL evaluation of the statement. In ESQL, the statement is just text.

Code:
SET mySQLStatement = 'SELECT * from '||SCHEMANAME||'.testtbl';
PASSTHRU(mySQLStatement)


Notice that I did not put in "Database." - this is because the statement needs to be valid Oracle SQL and therefore can't be valid ESQL.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
nab054371
PostPosted: Tue Jan 09, 2007 8:33 am    Post subject: Reply with quote

Disciple

Joined: 15 Nov 2006
Posts: 173

that worked,thanks!
Back to top
View user's profile Send private message
nab054371
PostPosted: Tue Jan 09, 2007 8:47 am    Post subject: Reply with quote

Disciple

Joined: 15 Nov 2006
Posts: 173

How do I get this to work:

DECLARE SCHEMANAME CHAR 'CTE'

IF EXISTS(SELECT * FROM Database.{SCHEMANAME}.USER_TBL AS T WHERE T.USER_ID = 'TGB056006') THEN


It looks like it does not find {SCHEMANAME} ?
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 » Oracle hints in compute node
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.