This blog is subject the DISCLAIMER below.

Thursday, February 25, 2010

Replication Error "SQL Server is unable to connect to server.."

If you're working in SQL Server Replication, you may get this message
SQL Server is unable to connect to server 'Your server name'.

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, 'Another server name'. (Replication.Utilities)



It always appears as you change the instance name manually or network administrators change the computer name.

Actually your server name still as it's and not changed with above changes so to avoid getting this message you should write these couple of T-SQL scripts every time you do one or all changes on the instance name

SELECT @@SERVERNAME -- you'll get a strange name, you may didn't see it before...
GO
sp_dropserver 'Old server name' -- you got it from pervious select.
GO
sp_addserver 'SQL server instance name','local' -- the name of current instance.
GO
Then, restart the service, and go on you replication work...

2 comments:

Saurabh Kumar Singh said...

you can also got lots of PHP api and payment gateway code here

http://apiwiki.blogspot.com

naquionline said...

Gotcha !!!
Thanks a Lot ....