Search code examples
sql-serversql-server-2008-r2replicationdatabase-replicationdata-synchronization

SQL Server Replication issues


I'm trying to set database snapshot replication using c# with SQL Server 2008 R2. when I'm connecting to the server everything goes as it should... but after the following lines of the code:

distributor = new ReplicationServer(conn);
distributor.InstallDistributor((string)null, distributionDb);

the following error occurs:

This edition of SQL Server cannot act as a Publisher or Distributor for replication. Changed database context to 'master'

Any ideas?


Solution

  • Per Replication Considerations (SQL Server Express), SQL Server Express cannot serve as a Publisher or Distributor, only as a Subscriber. You will need a Standard Edition or higher instance to configure distribution and setup a publication. The Express Edition instance can then serve as a Subscriber.

    SQL Server Express cannot serve as a Publisher or Distributor.