开发者

How to check whether database mail is working or not?

H开发者_开发技巧ow can I conditionally check whether SQL Server Database Mail is working or not?

Using EXEC msdb.dbo.sysmail_help_status_sp; we can check the status but I want to check the status conditionally like using If condition.


This stored procedure outputs table result with one value which refers to status. help is here That's what we know :)

You can use this result in .net code by retrieving this result set and checking value or in T-SQL code by putting result set in temporary table and checking value in it.

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜