khushbu (1/21/2013)
IF-ELSE block is working. But I would like try the statements in TRY-CATCH block, while there are some additional statements in CATCH block to report.
Catch is generally used for error handling and logging .
Lets take an example , the database on which you are trying to set service_broker doesnt exist , in that case your catch block will also get FAILED . think ? .
So better redesign/change your business logic
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)