Showing posts with label own. Show all posts
Showing posts with label own. 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

Friday, March 9, 2012

Need a way to use Windows NT intgrated security between two servers

Reporting Services is on its own Win2k3 server , running a report that
does a query against our Production database using Windows NT
Integrated Security.
The query never returns any data, yet when I run the query in Query
Analyzer it works fine...I have another report that uses "Credentials
stored securely in the report server" and that Query woks fine in RS
and in Query Analyzer...Has anybody found a way to use Windows NT
intgrated security between two servers accessed by IIS.RS is on one
server and the database is another..I don't have a direct answer for you but I have a suggestion. I think that
using the credentials of the calling user to hit the database is a bad idea.
The reason is that you will lose all the benefits of connection pooling. I
suggest having a readonly account that is used for the credentials of the
report. Then you use the role based security (with integrated security) to
only allow access to the reports the user should have. If you have sensitive
data that the user should only be able to see certain data then use the
global variable user!userid either as a query parameter or as a filter
parameter. The end result will be the same but your performance under load
will be much much better.
Bruce L-C
"Tom" <tom_barnard@.aotx.uscourts.gov> wrote in message
news:1096405401.694519.113440@.k17g2000odb.googlegroups.com...
> Reporting Services is on its own Win2k3 server , running a report that
> does a query against our Production database using Windows NT
> Integrated Security.
> The query never returns any data, yet when I run the query in Query
> Analyzer it works fine...I have another report that uses "Credentials
> stored securely in the report server" and that Query woks fine in RS
> and in Query Analyzer...Has anybody found a way to use Windows NT
> intgrated security between two servers accessed by IIS.RS is on one
> server and the database is another..
>