tags:

views:

1022

answers:

2

Hi,

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

+4  A: 

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.

Charles Graham
+1  A: 

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

Stuart Helwig
in SQL Server 2005 there is no originating_server on sysjobs table in msdb database, there's only originating_server_id which value was number(int/decimal)
Dels
This doesn't work for SQL Server Express 2005. I couldn't find either the originating server. There must be another way.
Junior Mayhé
True - it's only for sql2000(http://www.sqlservercentral.com/articles/Administration/65/)
Stuart Helwig