Sunday, March 11, 2012

Changing Server Name

I change the server name where SQL was original installed but the result of
'select @.@.servername' is still returning the name of the original server. Ho
d
dow I correct this?
Thankscheck out sp_addserver in BOL. That should help you.
"Emma" <Emma@.discussions.microsoft.com> wrote in message
news:362A7AD0-8C08-4BB7-B27C-4B9F4B3E1F3F@.microsoft.com...
> I change the server name where SQL was original installed but the result
of
> 'select @.@.servername' is still returning the name of the original server.
Hod
> dow I correct this?
> Thanks|||Do:
EXEC sp_dropserver 'oldname'
GO
EXEC sp_addserver 'newname', 'local', null
GO
Restart the server & @.@.SERVERNAME should return 'newname'. See the topic
"Renaming a Server" in SQL Server Books Online.
Anith

No comments:

Post a Comment