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 |
joni
Yak Posting Veteran
50 Posts |
Posted - 2006-11-10 : 09:15:24
|
Hi Gurus,I have a server named ME1-ORION hosted in Mexico. This server will be change to another place and I will need change it name from ME1-ORION to CI1-ORION. What I need to do to solve this problem without lost my connections database.ThanksJoni |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-10 : 11:13:13
|
Do you want to rename server without loosing existing connections?Then it's not possible because renaming server involves dropping and adding server again.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
miranwar
Posting Yak Master
125 Posts |
Posted - 2006-11-10 : 11:19:19
|
I'm not sure about the connections. But to change the server name you have to update syservers table on the master database with the new server name. Also to transfer your jobs you would have to update the sysjobs table on msdb. Update the column originating_server from the old server name to the new one. |
 |
|
joni
Yak Posting Veteran
50 Posts |
Posted - 2006-11-10 : 11:37:10
|
I think that I will need drop and adding server again, but my question is work well?? |
 |
|
miranwar
Posting Yak Master
125 Posts |
Posted - 2006-11-10 : 11:48:35
|
After you have renamed the server in Windows:EXEC sp_dropserver '<old_name>'goEXEC sp_addserver '<new_name>', 'local'goTHEN ON MSDB:DECLARE @srv sysnameSET @srv = CAST(SERVERPROPERTY('ServerName') AS sysname)UPDATE sysjobs SET originating_server = @srvIf this is a target server (you have jobs sent from a master server), you have to exclude them, so you don't convert those jobs into local jobs:WHERE originating_server = '<old_name>' |
 |
|
joni
Yak Posting Veteran
50 Posts |
Posted - 2006-11-10 : 13:07:36
|
it is simple think to do.thanks fellowsJoni |
 |
|
|
|
|