Thursday, March 29, 2012

Changing computer name

Can anyone advise how to change the computer name of a PC
which is running sql client with msde.
I find if I change the computer name sql server will not
start.
Any advise would be appreciated. Thanks
The following works for the default instance:
DECLARE @.old_server_name SYSNAME
DECLARE @.new_server_name SYSNAME
SET @.old_server_name = @.@.SERVERNAME
SET @.new_server_name = <your new computer name>
EXEC sp_dropserver @.server = @.old_server_name
EXEC sp_addserver @.server = @.new_server_name , @.local = 'LOCAL'
UPDATE msdb..sysjobs
SET originating_server = @.new_server_name
WHERE originating_server = @.old_server_name
You have to restart SQL Server (MSDE), and then change the computername, for
it to take effect though.
Jacco Schalkwijk
SQL Server MVP
"Elayne" <pstjw@.hotmail.com> wrote in message
news:c37501c47a33$c0d79090$a401280a@.phx.gbl...
> Can anyone advise how to change the computer name of a PC
> which is running sql client with msde.
> I find if I change the computer name sql server will not
> start.
> Any advise would be appreciated. Thanks
|||I've never experienced the SQL Server service failing to start after the
computer name was changed. What is the error you get when starting the
service from the command line (net start mssqlserver)? Are you able to
start SQL Server as console app by running "sqlservr.exe -c" from the
command line?
Regards,
Farooq Mahmud [MS SQL Support]
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

No comments:

Post a Comment