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 » Multiple Data Sources

Post new topic  Reply to topic
 Multiple Data Sources « View previous topic :: View next topic » 
Author Message
lanny boy
PostPosted: Mon Aug 01, 2005 8:11 am    Post subject: Multiple Data Sources Reply with quote

Voyager

Joined: 24 Nov 2003
Posts: 79
Location: UK

Hi all,

I am trying to create a second broker on a windows platform. The broker database I am using is in a different DB2 Instance than the configmgr. Can this be done?
I am able to create the broker and view it through the toolkit, however my deploys do not return anything. they do not even timeout.

Another problem(related) i am having is how to associate a data source with a broker. I want to run 2 different test environments on the same windows box, ie 2 brokers, 2 data sources.
I want to know if it is possible to create a data source in DB2 instance A which will be accessed by broker A.
I then want to create another data source with the same name (different alias) which will be accessed by broker B.
The reason for doing this is so i don't have to continually chnage datasource names when deploying code to the different brokers.

I am using WBIMB CSD04, DB2 81. Fix Pak 9.

Not sure if what i'm doing is possible, or if there is a better way to it. Any help would be great!

Thanks,
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 01, 2005 8:20 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

1) You need to troubleshoot this. We can't tell you what's wrong from the information you posted. What are the steps you followed to create the second broker, what results did you get at each step, does the broker start successfully, etc.

2) I think that broker is always going to resolve the same ODBC name to the same thing on the same system, unless you are running the broker with dfiferent service users, and the ODBC name is defined at the user level and not the system level.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
lanny boy
PostPosted: Mon Aug 01, 2005 8:27 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2003
Posts: 79
Location: UK

1) the steps i followed are as follows
I used the db2icrt to create the new db2 instance, and started the service.
I then created the broker DB.
Then i used the mqsicreate DB to create the broker an QM,
Then defined a listener and command initator, channels etc to communicate with the configmgr.
I registered the odbc
I started the broker successfully.
I got no error messages up til this stage.
From here i tried the deploy.


2) I can have 2 different users to run the brokers. How can i define the ODBC at user level and not system? Is there some documentation i can use that will achieve this?

Thnaks for your help.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 01, 2005 8:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

lanny boy wrote:
1) the steps i followed are as follows
I used the db2icrt to create the new db2 instance, and started the service.
I then created the broker DB.
Then i used the mqsicreate DB to create the broker an QM,
Then defined a listener and command initator, channels etc to communicate with the configmgr.
I registered the odbc
I started the broker successfully.
I got no error messages up til this stage.
From here i tried the deploy.

Do you see messages sitting on the transmission queues between the configmgr qm and the broker qm? Do the channels start?

Are there errors in the Event Log on either machine?

lanny boy wrote:
2) I can have 2 different users to run the brokers. How can i define the ODBC at user level and not system? Is there some documentation i can use that will achieve this?


Open up the "Data Sources(ODBC)" Control panel and look at it. Read the window carefully. Observe that there are different panes.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Aug 01, 2005 8:36 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
I want to run 2 different test environments on the same windows box, ie 2 brokers, 2 data sources.
I want to know if it is possible to create a data source in DB2 instance A which will be accessed by broker A.
I then want to create another data source with the same name (different alias) which will be accessed by broker B.

I would think the natural way to do this would be to change the "Data Source Name" in the Bar file editor before deploying.
Quote:
The broker database I am using is in a different DB2 Instance than the configmgr. Can this be done?
Does this mean you are using a different DB2INSTANCE environment variable for the broker?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
lanny boy
PostPosted: Tue Aug 02, 2005 6:41 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2003
Posts: 79
Location: UK

Thanks for you help Jeff / Wayne

Jeff,
The channels between the configmgr and broker QM are up and running, there are no messages on the transmission queues. (Both QM's are on the same box).
No errors are written to the event viewer.

If i was to set up the ODBC what steps what would i need to do? Do i need seperate DB2 instances for both envrinments? If i do should i have the broker DB and the data source in the same instance?



I think i need to (however i must be missing something) :-
Set up seperate users.
Create a broker DB for each broker?
Create the Datasource for each env (same DB name, diff alias?)
Create a broker using with each new user.
set up the user level odbc connection?


Wayne,

I could set the data source name in the bar file editor. However the whole reason for creating the two databses, broker etc is so my flows are environment independent.
Back to top
View user's profile Send private message
mqsidude
PostPosted: Tue Aug 02, 2005 12:33 pm    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2004
Posts: 148

Just curious to know if you have defined the transmission queues with the same name as the target queue managers.
Back to top
View user's profile Send private message
lanny boy
PostPosted: Wed Aug 03, 2005 12:25 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2003
Posts: 79
Location: UK

The transmission queues do have the same names as the QM's
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Aug 03, 2005 2:29 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

I tried this out last night, and it works.

1. Create two DB2 instances: "db2icrt DB2INST1" and "db2icrt DB2INST2"
2. In a db2 command prompt, set DB2INSTANCE=DB2INST1
3. Create the broker db (db2 create database wbrkbkdb) and your application database
4. set DB2INSTANCE=DB2INST2, then create the broker database and your application database (same db names as before).
5. create the odbc entries at the System DSN level for the two databases.
6. create two broker useriids (wbkusr1 and wbkusr2)
7. set DB2INSTANCE=DB2INST1, create the broker WBRK_BROKER1 using user: wbkusr1
8 set DB2INSTANCE=DB2INST2, create the broker WBRK_BROKER1 using user: wbkusr2
9. In the "System" setting, create a LOCAL environment variable for user1: DB2INSTANCE=DB2INST1
10. In the "System" setting, create a LOCAL environment variable for user2: DB2INSTANCE=DB2INST2

Now, when you start WBRK_BROKER1, it will be using instance DB2INST1 and WBRK_BROKER2 will be using DB2INST2.

I think this has some merits becuase this way all the databases for a "instance" of a broker are contained in a single db2 instance. (just like all the queues for a single broker are in a single mq "instance").

And one final comment: why not create a MQ cluster for the two queue managers and this way you don't have to worry about transmission queues, etc.... -w
_________________
-wayne


Last edited by wschutz on Wed Aug 03, 2005 6:10 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail AIM Address
lanny boy
PostPosted: Wed Aug 03, 2005 6:04 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2003
Posts: 79
Location: UK

thanks for the help Wayne,

I am have a problem though. In step 4 you describe detting up the databases in the sceond instance
Quote:
4. set DB2INSTANCE=DB2INST1, then create the broker database and your application database (same db names as before).
(I assume you mean set DB2INSTANCE = DB2INST2)

However the broker and app DB's cannot be called the same thing because the DB name exists already
C:\Program Files\IBM\SQLLIB\BIN>db2 create database WBRKBKDB
SQL1005N The database alias "WBRKBKDB" already exists in either the local
database directory or system database directory.

Even if i assign alias names the same error is coming up.....
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Aug 03, 2005 6:12 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Okay, I've changed my original append (to say DB2INST2). Setting that environment variable should point you to a different instance of db2 (try : "db2 get instance" to confirm).
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
wschutz
PostPosted: Thu Aug 04, 2005 3:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Lanny boy, did you get this to work?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
lanny boy
PostPosted: Thu Aug 04, 2005 7:47 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2003
Posts: 79
Location: UK

hi Wayne,

sorry for not replying earlier. That did work, thanks very much for your help.

The reason for the duplicate errors when creating the DB's was because i was typing set db2instance = DBINST2 instead of db2instance=DBINST2. Because no error was thrown i assumed the command had worked!

Thanks again
Lanny Boy.
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 » Multiple Data Sources
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.