November 17, 2008 at 9:06 am
I want email alert for cluster server
like servername , active node , passive node?
is it possible?
November 17, 2008 at 1:43 pm
I am assuming you are trying to find out if you have a cluster failover, if this is the case you can poll the box and find out the physical host, if this changes, query against a process table, send out an alert, if its just to query and find the info then the code below will give the details as well. I believe I may have picked the script up on this forum, we use it to alert us whenever a clustered instance changes nodes.
create table #Host (
id tinyint identity(1,1),
Ping_Txt varchar(255))
Insert #Host (Ping_Txt)
exec master.dbo.xp_cmdshell 'ping localhost -n 1'
select @@servername, upper(substring(Ping_Txt,9,charindex('[',Ping_Txt)-10)) as Host,
Ping_Txt from #Host where id=2
drop table #Host
November 17, 2008 at 8:16 pm
this query is useful.
please send alert t-sql too?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply