| Author |
SELECT @@SERVERNAME
|
|
| Whispering Leaf 2006-03-08, 11:23 am |
| Why does this query return NULL?
It only happens on one of our SQL servers.
Thanks.
| |
| Francis 2006-03-08, 1:23 pm |
| It may have happened if the server was renamed.
Execute select serverproperty('serv
ername')
if this is different to @@servername you need to do the following:
EXEC sp_dropserver 'yourServerName'
EXEC sp_addserver 'yourServerName', 'local'
Stop SQL Server.
Restart SQL Server.
"Whispering Leaf" wrote:
> Why does this query return NULL?
>
> It only happens on one of our SQL servers.
>
>
> Thanks.
| |
| Thomas LaRock 2006-03-08, 8:23 pm |
| I have seen this when someone creates a linked server that has the same name
as the sql server.
if you look in the master..sysservers table, the row with a srvid = 0 should
be your servername.
--
Thomas LaRock
Database Administrator
ING Investment Management
"Whispering Leaf" wrote:
> Why does this query return NULL?
>
> It only happens on one of our SQL servers.
>
>
> Thanks.
|
|
|
|