SQL Server Replication issues - sql-server

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?

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.

Related

SQL Server Replication - No replicated transactions are available

I have created a publisher (on sql server 2008 r2), create transaction replication and have created a new database on subscriber sql instance (SQL Server 2012 Express).
After I have created a new subscription on SQL Server 2012 Express.
But My new database had't been updated via synchronization.
On server SQL server 2008 r2 via Replication monitor I can see that status is Uninitialized subscription for SQL Server 2012 Express and in details No replicated transactions are available. message
How I can fix it ?
Thanks
The error states that your subscription is uninitialized.
You need to create the initial snapshot. Right-click the publication under the Local Publications folder at the Publisher and click View Snapshot Agent Status. Then click Start. Once the snapshot is generated, synchronize your subscription to apply the snapshot.
This is covered in Create and Apply the Initial Snapshot.

Setting up Publication on SQL Server 2008 R2 Express

I cannot find the Local Publication folder in the node Replication in my SQL Server Management Studio.
I recently installed SQL Server 2008 R2 Express edition.
I also created two instances for testing purposes.
Solution for SQL Server 2005 is available here but not for SQL Server 2008 R2 Express
According to Replication Considerations (SQL Server Express), a SQL Server Express Edition instance cannot be used as a Publisher or Distributor:
SQL Server Express cannot serve as a Publisher or Distributor.
However, a SQL Server Express Edition instance can serve as a Subscriber.
You will need a SQL Server Standard Edition instance or higher to configure a publication.
Summarizing comments at one place - so it helps others,
SQL 2008 Express can not be used as publisher but can be used as subscriber.
read on MSDN to find out more Replication Considerations (SQL Server Express)

Creating replication between SQL Server 2000 (publisher) and SQL Server 2008 (subscriber)

I have old database server as SQL Server 2000 whose data has to be periodically updated to the SQL Server 2008 server (may be one time per day). So I have planned to use the replication. First I have created distribution database in SQL Server 2000 & added the new database as publisher.
But when I created the subscriber in SQL Server 2008 & connects to SQL Server 2000 then the publisher doesn't appear in the list. What could be the reason, I am using SQL Server 2008 express edition or if any one could point out to the step by step guide for setting up replication between SQL Server 2000 and 2008? I have used the wizard in SQL Server 2000 for creating distribution & publisher.
Mixed versions are supported, but:
Distributor version must always be equal or newer than Publisher
Subscribers for transactional replication can be within 2 versions newer/older of Publisher
Subscribers for merge replication must be equal or older than Publisher

unitialized subscription while replicating database

Getting this warning when trying to setup a transactional replication. This error occurs when setting up a subscription from sql server express using non impersonated login to the distributor. this works using sql server developer subscrption to sql server workgroup publication but not from sql express to sql workgroup. Im not sure if it is an issue with the agent or what not but the subscription setup is identical to my working subscription other than the ability to choose the login to the sql server agent.
If I'm reading this correctly, you're trying to use SQL Server Express as your publisher. SQL Server Express can only be a subscriber in a transactional replication.
http://www.microsoft.com/sqlserver/2005/en/us/compare-features.aspx#integration

SQL Server Express 2008 replication/synchronisation

We are looking at developing a small, simple, Access system for a client using SQL Server Express (2005 or 2008) as database. The only complicating factor is they have two offices and they will need to synchronise some (but not all) data between them.
What are my options with the Express edition for doing this? Is there any advantage to using 2008 over 2005?
Microsoft SQL Server 2008 Express (SQL Server Express) can serve as a Subscriber for all types of replication.
SQL Server Express cannot serve as a Publisher or Distributor.
Ref.
You could look to managing this yourself -- using GUIDs for primary keys, and a last update time stamp, as well as tracking last sync, etc.
If there isn't too much to keep in sync, then it shouldn't be too hard
Following should be done:
1) Server - SQL 2008 Server - Publisher / Distributor
one Central server - sql 2008 server - this would be the central place for data. You can created publication on sql server and specify which all tables need to be included in publication (before that you also need to finalize which replication method you need )
2) Client - SQL 2008 Express - Subscriber
in your case - each office can have sql express - you can use as many as you want. These express instances need to have subscription to the publication created by the central server.
( this also means that the SQL server should be accessible to the client - if you are not on intranet - VPN can help - vpn should be on - to create subscription and sync. If you don't have vpn - the server needs to have public IP and port open that client can subscribe to).

Resources