0

I working on Creating a replication Between sqlserver on a non-trusted domain.But i have come to realize that i can only use the servername instead of the ip address of my server.I tried using the current server name i got from the sysadmin.But still connecting with the servername still display the same error:

sqlserver replication requires the actual servername to make connection 
Connection throught a server alias,IP address, any other alternate are not supported
Specify the actual server name,'WIN-2JQ9ZRN3T'.(Replication.Utitilies).    

I ran a script to show my server name:

Select @@SERVERNAME    

The result was:WIN-2JQ9ZRN3T.This is very strange for me.I cannot connect with name i got from my sysad throught management studio,but on remote desktop i can remote connection using that name.
Now i want to update my servername using this script i came across on the internet:

sp_dropserver old-server-name
go
sp_addserver real-server-name, LOCAL
go

But i don't know what the impact would be because my predecessor configure a linkserver on the same server.Please advise

kombo
  • 655
  • 3
  • 11
  • 26

1 Answers1

1

You have proposed a good solution: you have to update the server name accordingly and restart SQL Server, otherwise you'll not be able to use replication.

On the other hand, please check the replication component is installed, this will save you to make another restart.

Regarding your concern with linked servers, please run

SP_LINKEDSERVERS

and check if old server name appears in SRV_DATASOURCE column.

Another option could be to setup a sql server alias: http://www.mssqltips.com/sqlservertip/1620/how-to-setup-and-use-a-sql-server-alias

bjnr
  • 3,353
  • 1
  • 18
  • 32
  • ,The result indicate 3 link server name, the one is having : WIN-2JQ9ZRPRN3T – kombo Nov 21 '13 at 09:56
  • Check in all stored procedures where this linked server is used: SELECT object_name(object_id), * FROM syscomments WHERE text like '%WIN-2JQ9ZRPRN3T%' – bjnr Nov 21 '13 at 10:12
  • SELECT object_name(id), * FROM syscomments WHERE text like '%WIN-2JQ9ZRPRN3T%' – bjnr Nov 21 '13 at 14:11
  • that works but no result.Meaning No storeprocedure exist the uses the server name i think? – kombo Nov 21 '13 at 14:23
  • Exactly, so you can proceed with your change. – bjnr Nov 21 '13 at 14:30