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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Renaming a server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-07-11 : 07:13:27
Liz writes "If we change the name of a computer, how do we properly change the computer name within the SQL server?

Thanks, Liz"

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2003-07-11 : 11:33:41
For SQL7
1) You need to rerun setup (this doesn't install anything)
2) Run the following in Query Analyzer
sp_dropserver 'oldservername'
go
sp_addserver 'newservername','local'
go
3) Restart SQL Service

For SQL2000
1) Go into Query Analyzer after the rename/reboot. Then run
sp_dropserver 'oldservername'
go
sp_addserver 'newservername','local'
go

2) Restart SQL Service
3)If you have any jobs set up you will need to fix these as well which you can do by running the following procedure [url]http://www.sqldev.net/download/sqlagent/sp_sqlagent_rename.sql[/url]



HTH
Jasper Smith

0x73656c6563742027546f6f206d7563682074696d65206f6e20796f75722068616e6473203f27
Go to Top of Page
   

- Advertisement -