Monday, 4 May 2009

What is a SQL Server's name

This is a helpful script to check naming within SQL Server.

select @@SERVERNAME as [@@SERVERNAME],
SERVERPROPERTY('ServerName')as [SERVERPROPERTY('ServerName')],
SERVERPROPERTY('MachineName')as [SERVERPROPERTY('MachineName')],
SERVERPROPERTY('InstanceName')as [SERVERPROPERTY('InstanceName')],
host_name()as [host_name()]

No comments:

Post a Comment

Note: only a member of this blog may post a comment.