|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Server Name and User Name under which broker is running |
« View previous topic :: View next topic » |
Author |
Message
|
achocks |
Posted: Fri Sep 07, 2012 1:38 pm Post subject: Server Name and User Name under which broker is running |
|
|
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 |
|
 |
NealM |
Posted: Fri Sep 07, 2012 2:28 pm Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Sat Sep 08, 2012 4:34 am Post subject: |
|
|
 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 |
|
 |
NealM |
Posted: Sat Sep 08, 2012 7:52 am Post subject: |
|
|
 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 |
|
 |
lancelotlinc |
Posted: Mon Sep 10, 2012 4:52 am Post subject: |
|
|
 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 |
|
 |
NealM |
Posted: Wed Sep 12, 2012 10:19 am Post subject: |
|
|
 Master
Joined: 22 Feb 2011 Posts: 230 Location: NC or Utah (depends)
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 12, 2012 10:30 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|