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 » catch unclassified exceptions for database operations

Post new topic  Reply to topic
 catch unclassified exceptions for database operations « View previous topic :: View next topic » 
Author Message
vijayakumar
PostPosted: Thu Jan 27, 2011 10:33 pm    Post subject: catch unclassified exceptions for database operations Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

In the IBM infocenter help ,

gave the statement as

If you want to catch unclassified exceptions, use the "all" wildcard ("%") for the SQL state on the last handler of a scope. This wildcard will continue to catch the same set of exceptions if previously unclassified exceptions are given new unique SQL states.

how to use the wilcard for the sqlstate ? . can anyone help me with the example
Back to top
View user's profile Send private message
saurabh867
PostPosted: Thu Jan 27, 2011 10:59 pm    Post subject: Reply with quote

Voyager

Joined: 13 Jun 2010
Posts: 78

Try to use like this :
DECLARE EXIT HANDLER FOR SQLSTATE LIKE '%'
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Fri Jan 28, 2011 10:06 am    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

please suggest how to use this hander for DB related works.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jan 28, 2011 10:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So you asked how to specify that you wanted to catch all exceptions from a DB, regardless of what they were.

You were then told.

Now you want to know what to do with the exceptions?

Please try harder.
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Fri Jan 28, 2011 11:27 am    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

wht will happen if there is no database exception happened in the exit handler ?
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Jan 28, 2011 11:39 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

You can create a handler to catch all DB exception and only DB exceptions like this:

Code:
DECLARE EXIT HANDLER FOR SQLSTATE LIKE 'D%'


And if there is no exception your code in the handler will never be run...


Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jan 28, 2011 11:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I do not have the honor to understand the question you have asked.
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Fri Jan 28, 2011 11:52 am    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

If the database operation is happened successfully , the sqlstate will not return any value rite.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 28, 2011 11:54 am    Post subject: Reply with quote

Grand High Poobah

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

vijayakumar wrote:
If the database operation is happened successfully , the sqlstate will not return any value rite.


a) this is a database question not a broker question
b) it will return a state indicating the successful completion of the database operation (depending on database platform to some extent)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Jan 28, 2011 12:15 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Quote:
If the database operation is happened successfully , the sqlstate will not return any value right?


Correct.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » catch unclassified exceptions for database operations
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.