How we can we know SQL Replication components installed in SQL server Can somebody please let me know how can we identify whether Replication components installed in SQL server.

Tried below:

1.we had changed the server name earlier so while checking with configure distributor and publication giving the below warning.

TITLE: Configure Distribution Wizard


  SQL Server is unable to connect to server 'xxxxxxxx'.


ADDITIONAL INFORMATION:


  SQL Server replication requires the actual server name to make a
  connection to the server. Specify the actual server name, 'zzzzzzzzz'.
  (Replication.Utilities)




i will rename the server.


while tried with configure subscription giving below warning.


TITLE: New Subscription Wizard

 


  Microsoft SQL Server Management Studio is unable to access replication
  components because replication is not installed on this instance of
  SQL Server. For information about installing replication, see the
  topic Installing Replication in SQL Server Books Online.


ADDITIONAL INFORMATION:
 


  Replication components are not installed on this server. Run SQL
  Server Setup again and select the option to install replication.
  (Microsoft SQL Server, Error: 21028)


Now, Please suggest whether the Replication components installed in SQL instance
You can us the below T-SQL command to query the registry and confirm is Replication Components are installed:

USE master;  
GO  
DECLARE @installed int;  
EXEC @installed = sys.sp_MS_replication_installed;  
SELECT @installed; 


if @installed = 0 then replication is not installed. That stored procedure actually reads the registry using the below command, which is another way of checking:

EXEC master.dbo.xp_instance_regread 'HKEY_LOCAL_MACHINE',   
        'SOFTWARE\Microsoft\MSSQLServer\Replication',  
        'IsInstalled'


sp_MS_replication_installed example

Underlying code