Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AgaK
Yak Posting Veteran
86 Posts |
Posted - 2010-12-06 : 13:45:49
|
HiOne of our SQl servers was renamed by a sysadmin and the sp_helpserver and select @@servername doesn't show the same name. The sp_helpserver shows the new name but select @@servername is still showing the old one.Any ideas how it can by fixed?thank youAK |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2010-12-06 : 14:01:03
|
Look up sp_dropserver and sp_addserver in Books Online. |
|
|
avinashily
Starting Member
10 Posts |
Posted - 2010-12-08 : 10:07:22
|
hi,get current SQL Server name\instance name SELECT @@SERVERNAMEand alsoget current machine name and instance name SELECT SERVERPROPERTY('MachineName'), SERVERPROPERTY ('InstanceName')if from both the queries you observe that the names are different you need to change your sql server name in sql server instancefor that you need to use.sp_dropserver 'old_name' go sp_addserver 'new_name', 'local' gothis would work fine.// it is always suggested to do it first on the test server then implement on production server// |
|
|
|
|
|