I am using SQL Server Express 2008 R2 and I wanted to change the instance name from "machine name"\SQLEXPRESS2008R2 to just "machine name". I ran:
sp_dropserver 'old_name'
go
sp_addserver 'new_name', 'local'
go
Then restarted the SQL Service. Now when I look at
Select @@SERVERNAME --this is correct
But this isn't correct?
Select serverproperty('ServerName') --This still shows old name
So when I try to connect to my instance via SSMS I still have to connect using the old instance name isntead of the new on I just applied? What am I doing wrong? Why is the new name not taking?
Thanks,
S
Yes, rebooting the SQL server worked. now both names show up correctly.
SELECT @@SERVERNAME
SELECT serverproperty('ServerName')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With