views:

610

answers:

1

After I renamed my PC, I couldn't create new paublications, for database replication in SQL Server 2005. I receive un error "SQL Server replication requires the actual server name to make connection to the server." When I returned my old PC name, the problem solved. How could I make use of replication after renaming the PC?

+4  A: 

The SQL Service itself still thinks it has the old server name, and since it has the habit of referring to itself in the third person, this causes problems when the underlying server name has changed. You need to take the following steps to correct it:

  1. Run "Select @@ServerName" to verify the servername - it should be the old name.
  2. sp_dropserver ‘OLDSERVERNAME’
  3. sp_addserver ‘NEWSERVERNAME’, local
  4. Restart both the SQL Service and the Agent Service
  5. Run step 1 again to confirm that the server name is now correct
rwmnau