[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Need tool and/or script for Monitoring Windows Cluster - Node Failover , Resource Failover, etc.

Posted on 2011-03-08
4
Medium Priority
?
877 Views
Last Modified: 2012-05-11
Hi,

I have two Windows 2003 servers clustered, Active/Passive.  The app hosted is SQL Server 2005. I work for a low budget company and cannot afford to purchase a monitoring tool;

I need to be able to monitor when the nodes failover.  I would appreciate input re: free tools and/or  that can help do this.

Thank you.
D
0
Comment
Question by:dteshome
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 2000 total points
ID: 35073760
Here's what I do from SQL to monitor which node I'm on and determine if failover occured: I have a SQL job scheduled to run every minute and executes the code below that sends an email alert if there there was a failover:

if (select cast((select ServerProperty('ComputerNamePhysicalNetBIOS') as server_name) as sysname) as server_name) <> (select server_name from MyDB..active_node)
begin

      DECLARE @sqlstr varchar(4000),
            @passive_node varchar(100),
            @active_node varchar(100)
      set @passive_node = (select server_name from MyDB..active_node);
      set @active_node  = (select cast((select ServerProperty('ComputerNamePhysicalNetBIOS') as server_name) as sysname) as server_name);

      SET @sqlstr = 'SQL PROD failed over from node: ' + @passive_node + '     to: ' + @active_node +char(13) +char(13)
                              + 'Check SQL Logs for more details';


      EXEC msdb.dbo.sp_send_dbmail
            @profile_name = '911',
            @recipients = '911@whatever.com',
            @subject = 'SQL PROD Failover Alert!!!',
            @body = @sqlstr;

      update MyDB..active_node set server_name = (select cast((select ServerProperty('ComputerNamePhysicalNetBIOS') as server_name) as sysname) as server_name);

end
GO


--------
please note the code above relies on table:

create table MyDB..active_node (server_name      varchar(100))
0
 

Author Comment

by:dteshome
ID: 35085499
Thank you for the info, I will sure use it in the future.
Dan
0
 

Author Closing Comment

by:dteshome
ID: 35085504
Thank you!  This is a very clever approach.

Dan
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
If you ever consider purchasing any Daossoft Software Products, DON'T expect any meaningful support - This article should convince you why!
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question