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 » Dynamic DSN name in Compute Node.

Post new topic  Reply to topic
 Dynamic DSN name in Compute Node. « View previous topic :: View next topic » 
Author Message
new_to_wmb8
PostPosted: Tue Dec 22, 2015 12:54 am    Post subject: Dynamic DSN name in Compute Node. Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

Hi All,

I'm working on a Generic Flow that will check the DSN's present in DEV Env. , HTTP Input Node has DSN name and based on it we are just checking the ODBC Connection . We are not calling any Schema in ESQL. The flow is working fine when we mention "Data Source" name is Compute Node.

Now , I need to pass the Data Source Dynamically that we get from URL . Can please help to achieve this requirement . I have seen all the other post related to it and all of them were calling different DB in ESQL using SELECT or PASSTHRU..our requirement is just to pass the DSN in compute node ..may be some LocalEnv tree or something...

Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 22, 2015 1:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

In order to achieve something like this you'll need the latest edition of IIB. (IIB 10.0.0.3)
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
new_to_wmb8
PostPosted: Tue Dec 22, 2015 2:58 am    Post subject: Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

Ohh okay..we are on IIB9 ..can you provide any link that specify that it can be done on (IIB 10.0.0.3) ..
Back to top
View user's profile Send private message
maurito
PostPosted: Tue Dec 22, 2015 4:16 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

fjb_saper wrote:
In order to achieve something like this you'll need the latest edition of IIB. (IIB 10.0.0.3)

Not necessarily. If all the DSNs support the same functionality, this can be done in v9, providing a Data Source is entered in the compute node.

Quote:

You can access more than one database by using the FROM clause in your ESQL statement, but all databases that are accessed from the same node must have the same ODBC functions as the database that is specified on the Data Source property on that node. This requirement is always satisfied if the databases are of the same type (for example, DB2® or Oracle), at the same release level (for example, release 9.1), and on the same platform. Other database combinations might have the same ODBC functions. If a node tries to access a database that does not have the same ODBC functions as the database specified on the Data Source property on that node, the broker generates an error message.


Last edited by maurito on Tue Dec 22, 2015 4:28 am; edited 1 time in total
Back to top
View user's profile Send private message
new_to_wmb8
PostPosted: Tue Dec 22, 2015 4:28 am    Post subject: Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

Quote:
Not necessarily. If all the DSNs support the same functionality, this can be done in v9, providing a Data Source is entered in the compute node.


As mentioned earlier , I need to make the Data Source dynamic on Compute Node . Can you guide me how to do that.
Back to top
View user's profile Send private message
maurito
PostPosted: Tue Dec 22, 2015 4:29 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

new_to_wmb8 wrote:
Quote:
Not necessarily. If all the DSNs support the same functionality, this can be done in v9, providing a Data Source is entered in the compute node.


As mentioned earlier , I need to make the Data Source dynamic on Compute Node . Can you guide me how to do that.


by looking at the documentation, and following the syntax.

for example:
Code:

select * from Database.<dynamic data source>.table   etc.
Back to top
View user's profile Send private message
new_to_wmb8
PostPosted: Wed Dec 23, 2015 9:52 pm    Post subject: Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

I am not accessing any table from Database, I am creating a Generic Flow to Just Check the ODBC Connection. The flow will be used to check the ODBC Connection of the DSN in DEV and if that is present it will reply back succes.
As of now I'm able to test for one Data Source by giving the Name of that in Compute Node..but i need to make it Dynamic ...

Can any one help on this...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 23, 2015 10:39 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

new_to_wmb8 wrote:
I am not accessing any table from Database, I am creating a Generic Flow to Just Check the ODBC Connection. The flow will be used to check the ODBC Connection of the DSN in DEV and if that is present it will reply back succes.
As of now I'm able to test for one Data Source by giving the Name of that in Compute Node..but i need to make it Dynamic ...

Can any one help on this...

And here I thought this was called mqsicvp... but you have to run it as the broker service user...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
new_to_wmb8
PostPosted: Wed Dec 23, 2015 10:45 pm    Post subject: Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

Quote:
And here I thought this was called mqsicvp... but you have to run it as the broker service user...


Yes I know that command is used to check it , I need to create a flow for that. We have already have a flow that check the JDBC connection , I need to create a new flow for ODBC....

Is this is possible ..
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 23, 2015 11:51 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

new_to_wmb8 wrote:
Quote:
And here I thought this was called mqsicvp... but you have to run it as the broker service user...


Yes I know that command is used to check it , I need to create a flow for that. We have already have a flow that check the JDBC connection , I need to create a new flow for ODBC....

Is this is possible ..

Only in V10. In V9 you'd have to create 1 flow with 1 Node per ODBC type...
And yes you'd still have to do a select against the DB...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
new_to_wmb8
PostPosted: Thu Dec 31, 2015 3:07 am    Post subject: Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

Quote:
Only in V10. In V9 you'd have to create 1 flow with 1 Node per ODBC type...
And yes you'd still have to do a select against the DB...

Could you please provide any link that says it only can be achieved in V10.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 31, 2015 6:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If all of the DSNs are for DB2 or Oracle or etc, then you can simply use a compute of some sort node (java, etc) to populate the right part of the tree, and then pass to the next node that has *some* DSN set on it that points to a DB2 or Oracle or whatever database.

If you have different types of databases, some DB2, some Oracle, etc.
Then you need different nodes that have different DNS set on them, one for each type of database. And some way to know which DSN from the input goes to which type of database.

Here's the important question though.

Suppose some application calls this service, and it responds that the DSN is up and running. Immediately after the service responds, that DSN fails - the database crashes or whatever.

How has the service helped the situation?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
new_to_wmb8
PostPosted: Tue Jan 12, 2016 10:08 pm    Post subject: Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

Thanks mqjeff for Suggestion .

As we are creating a generic flow and purpose of this to just get the information about the ODBC DSN created on DEV/UAT Unix Env.

Can we use
Quote:
mqsicvp command as an ODBC test tool

this command issues an informational message for a successful connection, providing the name of the data source, database type, and version. Can somehow we can call or trigger this using ESQL or Java code from Message flow.. ?
[/quote]
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Jan 12, 2016 11:01 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

new_to_wmb8 wrote:
Thanks mqjeff for Suggestion .

As we are creating a generic flow and purpose of this to just get the information about the ODBC DSN created on DEV/UAT Unix Env.

Can we use
Quote:
mqsicvp command as an ODBC test tool

this command issues an informational message for a successful connection, providing the name of the data source, database type, and version. Can somehow we can call or trigger this using ESQL or Java code from Message flow.. ?
[/quote]

the mqsicvp utility can be run when the broker is not running. It has NO links to any flow and therefore can't trigger one be it ESQL or JAVA.

Thinks of it as a standalone test utility. Just providing the DSN and broker name is how I use it. This takes the broker params as set by mqsisetdbparms and checks to see if it can connect to the DB of whatever type it is.

Frankly, in my now 14 years of using this product, I have never needed to go beyond that but what do I know eh? (don't answer that)
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
rafaeluchoa
PostPosted: Tue Dec 12, 2017 7:06 am    Post subject: Reply with quote

Newbie

Joined: 12 Dec 2017
Posts: 1

I know that this thread is very old, but I'm working with IIB9.0.0.2 and I needed to use dynamic DSN datasources, then you can create:

SET NUDB = '01';
SET DS = 'DB' || NUDB;
SET T0 = THE(SELECT ITEM T.ID FROM Database.{DS}.dbo.T000);

I hope that help someone, because I searched very sources for this hint.
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 » Dynamic DSN name 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.