Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts

Wednesday, March 28, 2012

NEED HELP - Merge Replication with SQL Server 2000

Hi, I posted about this before, and set out on my own to get this working, and haven't been able to. I'm trying to get merge replication working with my SQL server 2000, and after 2 weeks I still have nothing. I've gone through multiple 'walkthroughs' which all brought me to the same point. I'm getting down to crunch time, and I'm either going to use this or implement my own merge algorigthm (I'd much rather use this). So here's where I've gotten to:
My database it taking snapshots correctly (i think)
I believe IIS is configured correctly, because I am able to get to the dll in the snapshot folder
I have tried using two different DLL's, sqlcesa30.dll and sscesa20.dll. Here are the corresponding error messages I get:
sscesa20.dll : Header information is either corrupted or missing.
sqlcesa30.dll : Initializing SQL Server Reconciler has failed.
and from the sqlcesa30.dll log: 'Publication 'replicatePub' does not exist. -2147201022
Here is my code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;
namespace mergetest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
// Create a new instance of the SqlCeReplication class
SqlCeReplication rep = new SqlCeReplication();
rep.InternetUrl = @."http://10.0.64.135/replicate/sqlcesa30.dll"; // InternetURL
rep.Publisher = @."LUKETEST"; // Publisher
rep.PublisherDatabase = "replicate"; // PublisherDatabase
rep.PublisherSecurityMode = SecurityType.NTAuthentication;
rep.Publication = "replicatePub"; // Publication
rep.Subscriber = "mobile"; // Subscriber
rep.SubscriberConnectionString = @." Data Source=\My Documents\PubsMR.sdf"; // ConnectionString

try
{
// Check if the database file already exists
if (!System.IO.File.Exists(@."\My Documents\PubsMR.sdf"))
{
// Add a new subscripton and create the local database file
rep.AddSubscription(AddOption.CreateDatabase);
}
// Transfer the initial snapshot of data if this is the first
// time is this called. Subsequent calls will transfer only the
// changes to the data
rep.Synchronize();
}
catch (SqlCeException ex)
{
// Display any errors in a message box
MessageBox.Show(ex.Message);
}
finally
{
// Dispose of the SqlCeReplication object, but don’t drop the
// subscription
rep.Dispose();
// Notify the user that merge replication is complete
MessageBox.Show("Replication complete");
}
}
private void butGo_Click(object sender, EventArgs e)
{
}
}
}
I am also happy to pay for support in this matter. can you guys recommend where I would call at microsoft to get a helpful person? thanks.
|||I finally got it working! To people having trouble setting this up, I recommend using the sqlcesa30.dll (sql ce v3.0), as it gives MUCH more helpful error messages.
|||We are extremely sorry that we have not picked up your question and have not answered.

From next time on, please try out SQL Server and Merge Replication questions in other forum "SQL Server Replication" too (apart from this forum).

Thanks,
Laxmi NRO, MSFT, SQL Mobile

Monday, March 26, 2012

Need for Distributor server in existing Replication Setup

We have a setup with one Publisher Server and 15 Subscribers with merge replication configured for all subscribers. The current Database size is approximately 3 GB expected to grow to 10 GB in next 1 year. We wanted to know what benefits would we incur if we add an additional seperate distributor server (hardware box). Also, what is the approx. size of a database where a seperate distributor server (hardware box) is recommended.

Thanks in advanceRead up on replication in SQL Books Online (provided with SQL Server). It covers a lot of the trade-offs in detail. Without knowing a LOT more about your configuration, plans, etc. I don't know how to give you a simple answer.

Typically, when you have one publisher with only 15 subscribers, the load isn't too heavy unless the publisher is stressed. The primary advantage comes from improved security, better network performance, and better managability. As your system grows (more data and more subscribers), then the performance benefits will start to come into play.

Again, without a lot more understanding of what you are doing now and what you plan to do in the near future, I really can't give you a straightforward answer.

-PatP|||Sometimes you make me crack up, I swear. ..."only 15 subscribers"... You'll see an immediate benefit even if you have just 1 subscriber...man, how many of those have you set up?|||Nice to know that you find me good for something!

I've set up about six production replication systems, a few hundred training systems, and I'm not really sure how many test systems. As I said in my first post, without knowing a lot more about what the poster wants and what they've actually got, any observation I can offer is only in very general terms.

Based on my experience, if you set up at least one NIC for replication on a relatively beefy box, it can handle a reasonable user load along with the replication... If you try to skimp on bandwidth, RAM, or processing power, you can certainly swamp any box.

It seems obvious to me that having a separate distributor is better than having one box do both, so on that point we certainly agree. I guess the question is where do you see the performance "knee" due to the additional load imposed by distribution. Without knowing a lot more, I don't see how you can offer much insight there.

-PatP|||Hey, I just felt that having 15 subscribers is enough to predict that a dedicated distributor is well due, that's all ;)

Wednesday, March 21, 2012

Need Clarification - merge replication

Hi,
I need to add new tables to merge replication.
These are the steps I have followed,
1. Executed the table script both in Publisher & Subscriber
2. Add 'rowguid' column in that table (Publisher & Subscriber)
3. In publication properties-->Articles, included the new table and
snapshot was automatically started.
(a) Is it the correct way to add tables to merge replication or is there any
better way?
(b) Should I stop the merge agent during this process?
Please advise.
Thanks,
Soura.
Soura,
unless you're doing a nosync initialization, it is normal to add the
articles to the publication, run the snapshot agent then the merge agent. A
full snapshot is created, but only the new article will get propagated.
There's no need to deal with the guid column - it'll get created for you if
a guid (rowguid) isn't there.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)