As you may know SQL Replication can replicate data between different versions of SQL. It can replicated data from SQL 2012 to SQL 2016 etc. It can also replicate data from higher version to a lower version of SQL. However if you are trying to setup replication to a subscriber that is on higher version than your publisher you may get following error:
“The selected Subscriber does not satisfy the minimum version compatibility level”
Now the problem occurs only when you are adding a new subscriber using GUI and it is related only to version of SSMS you are using during setup.
Lets assume you are configuring subscriber that is on 2016 but your publisher and distributor is on 2012. You most likely connected to a Publisher and trying to add new subscription stream.
You have two solution for this:
- Use T-sql. When setting up by using T-SQL, the version of subscriber is not being checked as you are not even trying to connect to a subscriber. Only Distribution agent will connect to it later after the setup.
- As T-SQL setup could be bit difficult you have a second solution, which is to use tools that are on the same version as subscriber (in our example it should be SSMS 2016). You can do it either from Subscriber or other server. NOTE: The tools/SSMS should be located on workstation/server that have access to Publisher/Distributor and Subscriber. you need to have access to all 3 components of replication.
If you have other solution for this issue let me know in comments:)
While you can use just simple stored proc to browse commands (How to “Browse” Distributor (sp_browsereplcmds explained)) you can notices few issues with that proc… for example commands are not ordered by command_id. Here is some script I created. I found it useful especially if I want see the order of commands applied to subscriber:)
You just need to provide, published database name, Seqno of transaction that you want to check (you can get it from replication monitor, query msrepl_transactions etc.) and command id that you want to check. Leave NULL if you want to see ALL commands in given transaction.
--BROWSE REPL COMMANDS
declare @publisher_db nvarchar(150)
declare @publisher_db_id int
declare @seqno nvarchar(500)
declare @seqno_bin varbinary(16)
declare @error_id int
declare @error_txt nvarchar(1000)
declare @command_id int
set @publisher_db='<Published db>'
set @command_id = <command id> -- Leave NULL if all you want to get ALL commands from that transaction.
create table #temp_commands (
xact_seqno varbinary(16) NULL,
originator_srvname varchar(100) NULL,
originator_db varchar(100) NULL,
article_id int NULL,
type int NULL,
partial_command bit NULL,
hashkey int NULL,
originator_publication_id int NULL,
originator_db_version int NULL,
originator_lsn varbinary (16) NULL,
command nvarchar (1024) NULL,
command_id int NULL)
select @publisher_db_id=id from mspublisher_databases where publisher_db=@publisher_db
select @error_id=error_id from msdistribution_history where xact_seqno=@seqno_bin
select top 1 @error_txt=error_text from dbo.MSrepl_errors where id = @error_id
insert into #temp_commands
if @command_id is NULL
select command,command_id, @error_txt as 'Error' from #temp_commands order by command_id
select command,command_id, @error_txt as 'Error' from #temp_commands where command_id=@command_id order by command_id
drop table #temp_commands