2

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.

  1. 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

4
  • I guess this will be the answer, executed --> EXEC sp_MS_replication_installed output: RegOpenKeyEx() returned error 2, 'The system cannot find the file specified.' Msg 22001, Level 1, State 1 Msg 21028, Level 16, State 1, Procedure sp_MS_replication_installed, Line 35 [Batch Start Line 0] Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. Any suggestions on this?
    – vicky
    Sep 4, 2019 at 3:45
  • you have to run the SQL Server installation wizard again and install the replication components, check this here
    – Biju jose
    Sep 4, 2019 at 7:55
  • check this also
    – Biju jose
    Sep 4, 2019 at 7:58
  • Yeah, that is workaround, Thanks
    – vicky
    Sep 4, 2019 at 8:00

1 Answer 1

10

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.