Monthly Archives: November 2012

SQL 2005 and 2008 connectivity Issues After Changing the System Name (Computer Name)


Hi All,

In My  experience I have faced so many SQL issue due to the Change of System Name (Computer Name) after installed and configured SQL server .Some of the issues are like the followings

  • Not able to login with the Instance Name
  • Not able to create or edit publications

When we tried to work with publication we might get the following errors

“SQL Server is unable to connect to server ‘ServerName’

Additional information: SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, ‘Server Name’. (Replication. Utilities)”

So when Ever we need a change in the name of the System which we installed SQL Server

Use the following Query and stored procedure to update in in the SQL schema

Query to check the current System Name with SQL

Select @@servername

And if you get the null value or the old value, use the followings to update the same

Use Master
go
exec Sp_DropServer ‘OldName’
go
Use Master
go
exec Sp_Addserver ‘NewName’, ‘local’
go

Or Just use it as simple

Type   Sp_DropServer ‘OldName’

and press Execute or F5

Type  Sp_Addserver ‘NewName’, ‘local’

and press Execute or F5

Then stop and Start SQL Services

Cheers…!!!

Advertisements

Leave a comment

Filed under SQL, Uncategorized