May 17, 2004 at 2:40 pm
Hi
I am getting a wrong servername when i use @@servername
Its giving me wrong servername as 'API-SERVER'
but when i use SERVERPROPERTY ('Servername') its giving the correct servername. the actual name is 'SQL-Db-2k'
I tried sp_dropserver and sp_addserver but still giving the wrong servername when i used @@servername
I even checked SysServers it has the correct name.
I dont know how to correct this servername when @@servername is used.
Its not causing any problems on the serverside but in some applications (sps) we use @@servername.
any ideas???
May 17, 2004 at 2:56 pm
Have you restarted the SQL Service since running sp_dropserver and sp_addserver?
TL Broadbent
May 17, 2004 at 2:59 pm
No I did not restarted the server. I will restart the server and check again
Thank you
May 17, 2004 at 3:05 pm
Post your feedback, after your restart. I have to do the same thing to one of my server.
May 18, 2004 at 9:15 am
I just renamed three of my servers, since their SQL server names were different from the windows server names. You have to restart the SQL server for the changes to take effect. Remember to specify sp_addserver with the local option.
May 18, 2004 at 10:20 am
I restarted the server last night.
Its working now. I am getting the correct servername.
Thank you.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply