Rename SQL Server 2008 – standalone

Sometimes its a necessity to rename a SQL server or SQL server instance. I had to rename it couple of times in my IT career.

These are steps that I made.

step1 :
exec sp_dropserver ‘oldserver’
exec sp_addserver ‘newserver’,’local’
step2 :
restart the sql server and check whether below query output is same or not .
select @@servername,serverproperty(‘servername’)

step3 : for updating jobs – if you have any
use msdb
go
update sysjobs
set originating_server = serverproperty(‘servername’)
go

 

Once I used this procedure to rename newly installed SQL server, the second time it was on “production” server.
On the production server, I had to reinstall Reporting Server, because there was no way I could get it going of all the relations to old server name.
But database server, and jobs and connection to renamed server worked.

So, to everybody, good luck!