May 26, 2004 at 2:44 pm
Hello,
MSSQL 2000 w/SP3
When I SELECT @@servername, the result is NULL.
When I SELECT CONVERT(char(20), SERVERPROPERTY('servername')), I get the name of the database server that I am looking for.
Any ideas why @@servername returns NULL? And how/what do I change to have a value returned?
Many thanks. Jeff
May 26, 2004 at 3:32 pm
jeff,
have you (or anyone else) recently changed the name of your sql server?
@@servername refers to the network name of the sql server, where as the servername property of SERVERPROPERTY is explicitly set at installation time. see BOL 'SERVERPROPERTY' for a better explanation of that.
ll
May 27, 2004 at 6:24 am
Take a look here http://support.microsoft.com/default.aspx?scid=kb;EN-US;303774
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply