I am trying to configure the distribution of SQL Server (2016). This is an Azure SQL VM. However, when doing so I get the following error:
TITLE: Configure Distribution Wizard
------------------------------
SQL Server is unable to connect to server 'COMPANY-SQL'.
SQL Server replication requires the actual server name to make a connection to the server. Specify the actual server name, ''. (Replication.Utilities)
(note it is not actually COMPANY-SQL but a similar naming format). I have tried, as suggested in many posts to sp_dropserver and sp_addserver. This successfully creates @@SERVERNAME set to company-sql-2 which is the name of both my Azure resource (not sure where COMPANY-SQL originates). I'm lost as to how to connect here despite already being connected to the database & why the error says the actual server name is simply ''.
SERVERPROPERTY: The Windows server and instance name, which together make up the specific server instance, are provided by the ServerName attribute.@@SERVERNAME: The name of the local server as it is set up right now is provided by @@SERVERNAME.Run the following commands together and you will get two different names.
then change the server name by dropping the name got by
@@SERVERNAMEcommand withsp_dropserverprocedure and set name got bySERVERPROPERTYcommand withsp_addserverprocedure then Restart the SQL Server Service.