
Signature
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.

Signature
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Hilary Cotter" <hilary.cotter@gmail.com> wrote in message
news:%23$heMpdkFHA.3436@tk2msftngp13.phx.gbl...
Yeah, host_name() will return the workstation name from where it was run.
One option would be to use the cluster.exe command line utility
If I run the following command from the DOS prompt
cluster clusterName res resourceName
It returns Resource,Group,Node,Status
Example: Say my cluster name is MyCluster and I want to know the node name for the resource SQLServer (Instance1) then the command will be
cluster MyCluster res "SQL Server(Instance1)"
The output will be
Resource Group Node Status
-------------------- -------------------- --------------- ------
SQL Server (Instance1) SQL1 NODE1 Online
You can run the DOS command from Query Analyzer or stored proc using xp_cmdshell. See SQLServer Books Online for syntax.
Best Regards,
Uttam Parui
Microsoft Corporation

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
Hilary Cotter - 28 Jul 2005 11:21 GMT
Good point! But host_name will resolve correctly when run as a job on a
default instance which IIRC was what the op asked for.

Signature
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
> Yeah, host_name() will return the workstation name from where it was run.
>
[quoted text clipped - 26 lines]
>
> Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
> Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
> http://www.microsoft.com/protect
> http://www.microsoft.com/security/guidance/default.mspx
Tom Moreau - 28 Jul 2005 12:38 GMT
Of course, having this as a feature of SERVERPROPERTY() would be real cool.
;-)

Signature
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
Yeah, host_name() will return the workstation name from where it was run.
One option would be to use the cluster.exe command line utility
If I run the following command from the DOS prompt
cluster clusterName res resourceName
It returns Resource,Group,Node,Status
Example: Say my cluster name is MyCluster and I want to know the node name
for the resource SQLServer (Instance1) then the command will be
cluster MyCluster res "SQL Server(Instance1)"
The output will be
Resource Group Node Status
-------------------- -------------------- --------------- ------
SQL Server (Instance1) SQL1 NODE1 Online
You can run the DOS command from Query Analyzer or stored proc using
xp_cmdshell. See SQLServer Books Online for syntax.
Best Regards,
Uttam Parui
Microsoft Corporation

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
Uttam Parui[MS] - 29 Jul 2005 18:32 GMT
Sure. Feel free to email
sqlwish@microsoft.com
Best Regards,
Uttam Parui
Microsoft Corporation

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
Tom Moreau - 30 Jul 2005 01:22 GMT
Did that a long time ago. :-(

Signature
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
Sure. Feel free to email
sqlwish@microsoft.com
Best Regards,
Uttam Parui
Microsoft Corporation

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx