Author |
Message
|
rohank84 |
Posted: Tue Sep 21, 2010 7:46 pm Post subject: Validating Database in ESQL |
|
|
Centurion
Joined: 31 Dec 2008 Posts: 109
|
Hi Guys,
I am working on a code where i have to validate the database.
The validating is needed to check if database is up or not.
Is there are way to achieve this. This can be done by firing a query on a table and checking if it give any results but i am looking for a better way to get this.
I am using WMB 6.1.
Thanks in advance |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 22, 2010 4:13 am Post subject: Re: Validating Database in ESQL |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rohank84 wrote: |
I am working on a code where i have to validate the database.
The validating is needed to check if database is up or not.
|
Why on Earth would you need to do this in a broker flow? Infrastructure status should be separate from application logic. You'll be checking to see if the remote queue managers are running next. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Sep 22, 2010 6:04 am Post subject: Re: Validating Database in ESQL |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Vitor wrote: |
Why on Earth would you need to do this in a broker flow? Infrastructure status should be separate from application logic. You'll be checking to see if the remote queue managers are running next. |
Did we get out of the bed on the wrong side this morning?
Seriously, a lot of people have problems with broker in that there is no shiny GUI that shows everythnig that is going on. They heve been 'gui-ified' by using Windows for too long. As Broker runs in the background often sight unseen, they need reassurances like this.
or
They are to mean to install a proper system monitoring tool that will do the job for them OOTB.
I know that the odd DBA has been known to take a DB down for no apparrent reason but the zillion event messages all saying the same thing will surely give you a clue of problems in DB connectivity. _________________ 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 |
|
 |
Vitor |
Posted: Wed Sep 22, 2010 6:32 am Post subject: Re: Validating Database in ESQL |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
smdavies99 wrote: |
Vitor wrote: |
Why on Earth would you need to do this in a broker flow? Infrastructure status should be separate from application logic. You'll be checking to see if the remote queue managers are running next. |
Did we get out of the bed on the wrong side this morning? |
Possibly.
smdavies99 wrote: |
Seriously, a lot of people have problems with broker in that there is no shiny GUI that shows everythnig that is going on. They heve been 'gui-ified' by using Windows for too long. As Broker runs in the background often sight unseen, they need reassurances like this.
or
They are to mean to install a proper system monitoring tool that will do the job for them OOTB. |
I take both of those points. Where I was offering an objection was:
a) trying to use WMB as a montoring tool
b) putting "safety code" in a WMB flow to ensure all the components were running before processing a business message
smdavies99 wrote: |
I know that the odd DBA has been known to take a DB down for no apparrent reason but the zillion event messages all saying the same thing will surely give you a clue of problems in DB connectivity. |
Exactly. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rohank84 |
Posted: Thu Sep 23, 2010 1:26 am Post subject: |
|
|
Centurion
Joined: 31 Dec 2008 Posts: 109
|
Hey Guys,
Nice to hear your post.
Hey smdavies99 .. i did got up from the right side of the bed.
The reason for doing this is because there is a customized code which does a traffic management for message. Now because of the performance issue this needs to be done on broker and expectation is to achieve same in broker but its not compulsary.
Any other way of doing is always welcome.
Thanks in advance. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 23, 2010 2:20 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There isn't a more clever way (or more accuracte way) in the GENERAL CASE than to run an SQL statement against the database and see the results.
A specific database vendor may provide additional methods or additional metrics, but those won't be part of the SQL standard and won't be available from ESQL.
Whatever mechanism the existing application is using can likely be run in Broker - in a JavaCompute node or etc. depending on how it's currently implemented.
Whether you should be writing your own traffic management applications is an entirely separate issue. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 23, 2010 2:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rohank84 wrote: |
Hey smdavies99 .. i did got up from the right side of the bed. |
Feel he's talking about my bed not yours here....
rohank84 wrote: |
Any other way of doing is always welcome. |
Any of the WMQ / WMB built in features is a possibility _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu Sep 23, 2010 5:16 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Vitor wrote: |
rohank84 wrote: |
Hey smdavies99 .. i did got up from the right side of the bed. |
Feel he's talking about my bed not yours here....
|
It could be the same bed of course which explains how one of you got out the correct side but the other did not  |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 23, 2010 5:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
WMBDEV1 wrote: |
It could be the same bed of course which explains how one of you got out the correct side but the other did not  |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rohank84 |
Posted: Mon Sep 27, 2010 4:30 am Post subject: |
|
|
Centurion
Joined: 31 Dec 2008 Posts: 109
|
It seems
is talking about his own fantasies.
Well All the Best
Thanks MqJeff ... i guess it seems no other way ... I did the change the old way.
Thank Yous Guys for your time ....[/code] |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Mon Sep 27, 2010 5:04 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
rohank84 wrote: |
It seems
is talking about his own fantasies.
Well All the Best
|
Apologies but its all that gets me through the long, cold and wet days  |
|
Back to top |
|
 |
|