Replication between two different SQL Server versions We have mirroring configured (transactional replication) in our primary and secondary SQL Servers, which are running on Windows 2008 R2 SP2 OS with 2008 R2 SP3 as the SQL Server version.

If we first upgrade the secondary server, we have to figure out how the synchronization between the two servers has to be configured, as for some time they will be running with two different versions of SQL Server.

We want to upgrade them to SQL Server 2014.
It sort of depends whether you're using Database Mirroring, or Transaction Replication (although I suppose you could be using both)

Assuming Transaction Replication:

This is supported, so long as you stick to certain rules, as described in the MSDN article Upgrade Replicated Databases 

As long as your Distributor is the same version or greater than your Publisher, and a Subscriber is within two versions of the Publisher, which fits in your case so you're OK. That MSDN article provides instructions. 

This is similar to the question/answer asked a couple of years back, but the MSDN article has been updated since. 

If you mean Database Mirroring:

I'm assuming you don't mean this, as this question has been asked before in a number of ways, but I'll add the answer in for completeness. 

This can be done, but it is supported strictly for minimising downtime during upgrades (which it seems is what you are doing, so that's OK). 

Have a look at MSDN - Minimize Downtime for Mirrored Databases When Upgrading Server Instances for information about this (and a walk-through).