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 » Server Name and User Name under which broker is running

Post new topic  Reply to topic
 Server Name and User Name under which broker is running « View previous topic :: View next topic » 
Author Message
achocks
PostPosted: Fri Sep 07, 2012 1:38 pm    Post subject: Server Name and User Name under which broker is running Reply with quote

Voyager

Joined: 28 Nov 2011
Posts: 82

Hi There,

Anyone knows a way to retrieve the physical server name (in my case Unix Server) and the user name under which the broker runs from the ESQL code.

I searched the info center, but no luck..

My user wants that information sent as a part of identification.

Thanks in advance.
Back to top
View user's profile Send private message
NealM
PostPosted: Fri Sep 07, 2012 2:28 pm    Post subject: Reply with quote

Master

Joined: 22 Feb 2011
Posts: 230
Location: NC or Utah (depends)

Try searching on "broker properties". Specifically, BrokerUserId gives you the user ID that was used at mqsicreatebroker time. Not who ran mqsistart.
Regarding the machine name, nope, however you hopefully have a broker/qMgr naming convention that would uniquely identify one or the other to a machine. There are broker properties for both. If that doesn't satisfy him/her, you would need to do some sort of lookup using one of those as the key.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Sep 08, 2012 4:34 am    Post subject: Reply with quote

Grand High Poobah

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

NealM wrote:
Try searching on "broker properties". Specifically, BrokerUserId gives you the user ID that was used at mqsicreatebroker time. Not who ran mqsistart.


Not true on Unix (which the OP is using). On Unix this is the id which issued mqsistart. See here

NealM wrote:
Regarding the machine name, nope, however you hopefully have a broker/qMgr naming convention that would uniquely identify one or the other to a machine.




Queue manager name should be unique in an estate and is typically derived from the host name.

Failing that, you could cheat slightly and call out from ESQL to a Java class that does a gethost() for you....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
NealM
PostPosted: Sat Sep 08, 2012 7:52 am    Post subject: Reply with quote

Master

Joined: 22 Feb 2011
Posts: 230
Location: NC or Utah (depends)

Regarding BrokerUserId: Sorry, I was looking at the v6.1 ESQL manual, which talks about the mqsicreatebroker username on the -i parm. I do see that in my v8.0.0.1 Toolkit Info Center, it now explicitly states that it is the username that issued the mqsistart, evidently on all platforms.

And regarding machine name, I noticed that in the Monitoring Event data, there is a hostName attribute returned, which got me to wondering why IBM doesn't add it as a Broker property also. So I just filed a Sev 4 inquiry service request (on MB8) to ask. If I get a positive answer in the next couple weeks I'll post it here.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Sep 10, 2012 4:52 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

NealM wrote:
Regarding BrokerUserId: Sorry, I was looking at the v6.1 ESQL manual, which talks about the mqsicreatebroker username on the -i parm. I do see that in my v8.0.0.1 Toolkit Info Center, it now explicitly states that it is the username that issued the mqsistart, evidently on all platforms.

And regarding machine name, I noticed that in the Monitoring Event data, there is a hostName attribute returned, which got me to wondering why IBM doesn't add it as a Broker property also. So I just filed a Sev 4 inquiry service request (on MB8) to ask. If I get a positive answer in the next couple weeks I'll post it here.


Use a JCN to retrieve hostname. Store the host name in Environment. Reference the Environment from within ESQL.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
NealM
PostPosted: Wed Sep 12, 2012 10:19 am    Post subject: Reply with quote

Master

Joined: 22 Feb 2011
Posts: 230
Location: NC or Utah (depends)

Well, after getting my nose bent and pointing in the right direction, I replaced my PMR with a request for enhancement (RFE).
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=26394
(and I know Lancelot, JCN...)
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 12, 2012 10:30 am    Post subject: Reply with quote

Grand High Poobah

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

NealM wrote:
(and I know Lancelot, JCN...)


You want to do it from ESQ, then you want to do it from ESQL & it's your right to raise an RFE.

Vote now for change!
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Server Name and User Name under which broker is running
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.