Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Rename SQL Server not working Expand / Collapse
Author
Message
Posted Tuesday, December 17, 2013 9:16 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, May 13, 2014 9:21 AM
Points: 88, Visits: 199
I used Following Statement to rename the server

sp_dropserver 'PHLSQSLDR'

sp_addserver 'PHLSQSLTEST', local

Then i issued the command select @@servername
it gave me PHLSQSLTEST, so i thought the server is renamed.

I used SQL Server Management Studio to connect using server name 'PHLSQLSLTEST' but its not working.
I can still connect using PHLSQLSLDR

What am i missing?
Post #1523758
Posted Tuesday, December 17, 2013 9:29 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 4:09 PM
Points: 3,121, Visits: 11,395
Did you physically rename the Windows server and reboot?

Post #1523772
Posted Tuesday, December 17, 2013 9:33 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:50 AM
Points: 12,877, Visits: 31,792
renaming a server is a two part process;


one occurs at the operating system; the second is for convenience in SQl server.

You rename the server and then reboot.
AFTER that has occurred, then you rename the SQL server's name it has for itself, just as you described already.

then the two of them are syncronized.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son


  Post Attachments 
Rename.png (55 views, 132.92 KB)
Post #1523774
Posted Tuesday, December 17, 2013 9:45 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, May 13, 2014 9:21 AM
Points: 88, Visits: 199
No I didn't rename the windows server.

I have couple of SQL Instances running on the server.

I have a one named instance running on this computer, which i want to change.

I don't want to change the server name.
-------------------------------------------------
If this is not the solution then i can create an alias for the server. This i want to do it on the server, i dont want to do any settings on the client computers.

Bottom Line :
-We want to shutdown the Live Server (SqlLive)
- On the Test Box : Rename the SQL Server Instance name to (SqlLive) OR Create an alias SqlLive
- Test the Applications using the Test Box.
Post #1523779
Posted Tuesday, December 17, 2013 9:55 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:50 AM
Points: 12,877, Visits: 31,792
you cannot rename an instance.

that means, for example, if you installed machinename\SQLEXPRESS, and you want to rename it to be machinename\SQL2008R2 that is not possible. you have to backup whatever was on the instance, remove the instance, and reinstall.

that can get pretty involved, depending on the instance...SSIS packages, linked servers, certificates, logins, mail settings, and a lot of other items might need to be migrated.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1523786
Posted Tuesday, December 17, 2013 10:48 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, May 13, 2014 9:21 AM
Points: 88, Visits: 199
Is there a way to create an alias for the server on the server side ?
Post #1523819
Posted Tuesday, December 17, 2013 11:17 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 12:53 PM
Points: 205, Visits: 2,017
You could have a DNS entry created with the new name, and the instance's IP address.
Post #1523829
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse