Rajanand Ilangovan
Rajanand Ilangovan

Rajanand Ilangovan

How to check SQL Server Replication is installed in a Server?

Rajanand Ilangovan's photo
Rajanand Ilangovan
·May 11, 2022·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

When you setup a publication or subscription in a server where replication is not installed, you will get the below error.
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.

To check whether SQL Server replication is installed in a server or not, you can use the below methods.

Method 1

  1. Open SQL Server Installation Center
  2. Click Tools and then click Installed SQL Server features discovery report on the right side.

image.png

  1. Check the features report whether the Replication is configured or not. image.png

Method 2

Execute the below query and check the result. If it returns 1, then replication is installed in the server. This stored procedure is actually checking the registry and returns the result.

DECLARE @replication_installed int;  
EXEC @replication_installed = master.sys.sp_MS_replication_installed;  
SELECT @replication_installed;

Method 3

Read the registry and find whether SQL Server replication is installed or not. If installed, you will get value as 1 in Data column.

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

Impressum