Blankman
Blankman

Reputation: 266900

Rename a sql server instance

Is it possible to change a sql server instance name? Or is it something that can only be set during installation?

Upvotes: 6

Views: 6556

Answers (2)

Stuart Helwig
Stuart Helwig

Reputation: 9454

You can't rename the instance but you can rename a server (sql2000 only) - does that help at all?

Have a look at:

sp_dropserver 'oldname', 'droplogins'

and then;

sp_addserver 'newname', local

Be aware that if there are any jobs running on that server they'll need to be renamed too;

use msdb
go

update sysjobs set originating_server = 'newname'

You'll need to restart your SQL Server

Upvotes: 1

Charles Graham
Charles Graham

Reputation: 24835

To the best of my knowledge, they can only be changed at install time. You might be able to change the name with the installer package while keeping the current info. I would make backups of all of your databases and then try this.

On another note, changing instance names will just cause you so many headaches. Even if you can do it, I would strongly reccomend leaving well enough alone.

Upvotes: 6

Related Questions