Thursday, July 23, 2009

How to change SQL server name ?

A very common issue, when you make a p2v ( convert in vmare language ) to a physical Server and change the name of the server.

The whole idea is that the database still thinks it's on the pervious database and it damages his functionalty.

Those are the steps to check if you have this issue, and how to fix that.

 
//check the hosting server of the SQL service
sp_helpserver
select @@servername

//if the server name that appears is of the pervious server
// Make sure to run it from the server itself, NO remote execution
sp_dropserver 'old_name'
go
sp_addserver 'new_name','local'
go
// Now restart the SQL service and check the first step again to make sure.


Good luck

No comments:

Post a Comment