April 5, 2006 at 8:04 pm
How to check whether all resources are running on Node A of SQL Cluster?
April 7, 2006 at 8:55 am
try this...the first line tells which node is active
Declare
@CMD varchar(4000),@Server_Name varchar(100)
Set
@Server_Name = 'servername'
set
@Cmd = @Server_Name + '.Master..xp_cmdshell ''net statistics server'''
exec
(@Cmd)
April 7, 2006 at 11:53 am
When we create clusters in our company they usually end with 'A' or 'B', depending on the Node..
So you can do something like that and include that in the job, running every few hours:
DECLARE @server varchar(20)
EXEC master.dbo.xp_regread
'HKEY_LOCAL_MACHINE',
'SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName',
'ComputerName',
@server OUTPUT
If @server ='ServerA'
Exec ..sendmail..'My Server is running on A Node'
If @server ='ServerB'
Print @Server--do nothing: you might want to change that, depending which node is primary...
April 9, 2006 at 8:19 am
Is that not possible to view the same in the Cluster administrator --> under Active resources/groups??
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply