MS SQL Server Merge Replication

Jul 20, 2005

Hi, I have two databases on MS. SQL Server 200 the first one is the
main DB and the second one is a replica of it, both of them in
different territories .I connect them using merge replication just
when I need to merge the data.

The problem is when I make import data or export data from any
location (MS access ,MS SQL server ) to the second one (subscriber DB)
or the main DB(publisher and distributor ) ,the imported data does
not replicated to the other DB ???

Normal transaction replicated smoothly.

I hope you can help me.

Thanks in advance.

Mahmoud Khebaisa.

View 1 Replies


ADVERTISEMENT

SQL Server Two Merge Replication

Mar 3, 2004

Dear DBforum members

I have a problem Setting up pull subscription from a publishser to a subscriber , but I could set up Push subscription with out any problem between these two server .. can any one help me out.

I run SQL Server 2000 Enterprise edition.

I get the following error

"Publication 'ProdDB' does not exist. The step failed."

where ProdDB is the publication database from which my Push subscription is running.

thanx
Logs

View 1 Replies View Related

SQL 2012 :: Server Merge Replication

Oct 20, 2014

I have some problem about Merge Replication.i'm trying to merge Database A to Database B in local Server. So Database i want publisher contain this:

Because only Data in Table change therefore so i choosed it 100% Snapshot was generated after that ( Problem not a valid window user i already figured out )After that. I created Local Subscription in same Server ( Pull subscriptions and Subscription type: Client ),now problem is throw out."The schema script 'vwBuyADT_513.sch' could not be propagated to the subscriber."

I tried research so many time in Google but any information i found isn't useful for this problem.This problem still can ignore,Synchronization still running. But after 4-5 Hours running..This messages throw out: "The Publisher failed to allocate a new set of identity ranges for the subscription. This can occur when a Publisher or a republishing Subscriber has run out of identity ranges to allocate to its own Subscribers or when an identity column data type does not support an additional identity range allocation"

My question is:
Is there anyway solve 2 probem? :
1. "The schema script 'vwBuyADT_513.sch' could not be propagated to the subscriber."
2. "The Publisher failed to allocate a new set of identity ranges for the subscription. This can occur when a Publisher or a republishing Subscriber has run out of identity ranges to allocate to its own Subscribers or when an identity column data type does not support an additional identity range allocation"

View 7 Replies View Related

SQL Server 2000 Merge Replication

May 15, 2007

I am using SQL Server 2000 SP4 running on a MS Server 2003 with SP2. I am preforming Merge Replication on a continouas basis and the Merge Agent keeps stopping with the error 203 The process could not enumerate changes at the 'Publisher'. There is no additional information available with this error. Does anyone have any sugestions as to why this is happening. I can manually re-start the agent but it will fail again for particular reason.

View 1 Replies View Related

Alternatives To SQL Server Merge Replication

Apr 17, 2007



Hello,



I would like to know what alternatives are avaliable to SQL Server Merge Replication. I am also looking for Third Party Tools. Can anyone name a few for me.

View 4 Replies View Related

NEED HELP - Merge Replication With SQL Server 2000

Sep 20, 2005

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:

View 4 Replies View Related

A Call To SQL Server Reconciler Failed. SQL Server 2005, SQL Server Mobile Merge Replication

Oct 2, 2005

Hi,

View 36 Replies View Related

SQL Server 2000 Merge Replication Process

Jun 22, 2004

Hi,
I am trying to replicate a production database server,on sql server 2000 at a particular geographic location to a new failover database server on sql server 2000 in a different geographic location via internet. The intention here is to use the failover database during times when the production server is down or busy and the synchronization needs to be sceduled for every 10 min.
It will be of huge help if any expert could give the detailed process involved and any precautions that need to be taken. I also need to keep inmind to use the ever/odd sequence number generator during the replication implementation.
Also, Whether to use row-level or column-level tracking?

thanks
SV

View 2 Replies View Related

Sql Server Merge Replication Deleting Records

Mar 23, 2006

Hello,

I am having problems with my sql merge replication. Whenever a user syncs up to my main database, most of their records are deleted instead of being merged.
Or the records on the main database are inserted and it replaces the whole table with the records on the remote laptops. Is there a way to prevent this from happening? Someone please help me.

Corey

View 7 Replies View Related

Merge Replication Sql Server 2000 With SQLCE 2.0

Apr 6, 2004

I do a merge replication between Sql server 2000 and SQLCE 2.0

On my SQL2000 I have 4 tables i want to merge (specific columns only ) in 1 table for Merge with my SQLCe ( the table will be use for read only)

Question 1:
What is the best pratice for keep the information update?
Run store procedure before the synch for re-populate the table?:confused: or Make Trigger INSERT, UPDATE, DELETE in the all 4 table?:confused: or a mixte?:confused:

Question 2:
Does someone know about some web site talk about this type of trick?

Thanks

View 1 Replies View Related

Merge Replication Issues SQL Server 2005 X64

Jul 12, 2007

Hi ppl,

I have installed SQL Server 2005 x64 Enterprise edition with Service Pack 2 on a Windows Server 2003 x64 Standard Edition with Service Pack 2.

Now I have to configure Merge Replication that will work with SQL Server Compact Edition database on Windows Mobile devices.

Distributor and the Publisher are the same server.

IIS 6.0 is installed on the windows server. I have installed the SQL Server Compact Edition Server tools on the server. However the compact edition server tools are only available for 32bit servers and I have also found out from the article http://support.microsoft.com/default.aspx/kb/912430 that you cannot replicate data from SQL Server 2005 to SQL Server Compact Edition by using the 64-bit version of IIS.
So if this is true does that mean I can not use merge replication on 64 bit server? Does that mean I have to get another 32 bit server with 32 bit IIS on it to make this work or is there another work around. Am i missing something here?

Regards
Nabeel

View 1 Replies View Related

Locking Up After SQL Server Mobile Merge Replication

Nov 17, 2005

Hi,

View 14 Replies View Related

SQL Server 2005, MS Access Merge Replication?

Feb 13, 2006

Hey there!



In a nutshell, I want to do a merge replication with a SQL Server and
several Access databases. I haven't been able to find anything in the
documentation or 3rd party books.



Is this possible?



Thanks!

- Erik

View 7 Replies View Related

Locking Up After SQL Server Mobile Merge Replication

Nov 9, 2007



Hi ,
I would like to get your advice in an issue that I am facing regarding merge replication.
The flow is like:
1) User enter his login name and password.
2) Host_name is set as the login name that the user enters.
3) Based on the HOST_NAME property after filtering user gets the records relevent only to him
(Differnet subscriber may use same mobile device).

4) He make some changes in the local sdf according to the business logic.
5) The application Syncs with server on the next login session.

My issue is when I am trying to run the application in emulator exactly at the sdf updating part the application terminates.
Error mess: Connection to Remote Device has been lost.....
If I execute the same sql insert query it works om the local sdf and master database.
Emulator used where Pocket PC 2003 SE and Windows Mobile 6 classic emulator.
I have installed 1) Visual Studio 2005 SP 1 2) net compact framework SP2.

When I comment all the code related to Sync ,application works witout any issue.
And the same application works in my "I mate kjam".

The code that I use is given below:
==========================================================================

public void Sync(string hostname, int newsub) // Parameters for HOSTNAME and flag to denote new user or existing //user.

{

SqlCeReplication repl = new SqlCeReplication();

repl.InternetUrl = @"http://231.000.000.211/Merge/sqlcesa30.dll";

repl.Publisher = @"SERVER";

repl.PublisherDatabase = @"Merge";

repl.PublisherSecurityMode = SecurityType.DBAuthentication;

repl.PublisherLogin = @"sa";

repl.PublisherPassword = @"password";

repl.Publication = @"Merge";

repl.Subscriber = @"MergeSub";

repl.HostName = hostname;







repl.SubscriberConnectionString = @"Data Source=""Program FilesMerge.sdf"";Max Database Size=128;Default Lock Escalation =100;";





try

{

if (newsub == 0)

{

if (File.Exists(@"Program FilesMerge.sdf"))

{

File.Delete(@"Program FilesMerge.sdf");

}



repl.AddSubscription(AddOption.CreateDatabase);

repl.Synchronize();

repl.Dispose();

MessageBox.Show("newuser sync Done");

}

else

{

if (!File.Exists(@"Program FilesMerge.sdf"))

{

repl.AddSubscription(AddOption.CreateDatabase);

repl.Synchronize();

repl.Dispose();

MessageBox.Show("FirstSync Done");

}

else

{

repl.Synchronize();

repl.Dispose();

MessageBox.Show("SameuserSync Done");

}

}

=================================================================================
Please advise......

View 1 Replies View Related

SQL Server CE Merge Replication Synchronization Question

Mar 9, 2006

I am running SQL Server 2000 and SQL Server CE on the handheld device. I have created the publication on the SQL Server.

I can subscribe to the publication successfully on the handheld and it creates the .sdf file just fine.

When I then attempt to synchronize, the process will run for a long time and eventually error out. (The database has a couple large data tables that are used for value lookups)

The error says the connection was broken.

Any suggestions on correcting this?

I am thinking of breaking the replication database into 2. One with the large lookup files and one with the updated tables. I still need to get the large database with the lookup tables onto the handheld though.

Any thoughts, advice or similar experience handling a situation as this would be appreciated.

thanks,

Dan

View 1 Replies View Related

Transfer Data Between SQL CE AND SQL SERVER Without Merge Replication

Jan 25, 2008

I've got a problem:

I want to transfer data between an sql server 2005 and my pocket pc. So i've installed a sql server CE on it.

I know that i can use the merge replication but, i don't have any IIS. So, i've got to transmit data though email that have got a file attached. I Know how to email from sql server 2005. When the pocket receive that email, i don't know how to insert the data in sql ce from outlook compact. Doi have tu use SSIS , in that case how can i run the package?

thanks

View 4 Replies View Related

Merge Replication Issue SQL Server 2005

Jul 18, 2007

I have set up merge replication with 1 publisher and 1 subscriber. Distribution is handled by a 3rd server.



I can generate a snapshot at the publisher and apply it to my subscriber. But when I insert some data (approx 30,000 rows) , the Synchronization agent gives the following error when It runs:


The merge process is retrying a failed operation made to article 'xxx' - Reason: 'The Merge Agent was unable to synchronize the row due to one or more unanticipated errors in the batch of changes. When troubleshooting, increase the -OutputVerboseLevel setting, restart the agent, and check for and resolve any errors generated by the database engine. '.





I have increased the OutputVerboseLevel setting and specified a file path in the -OutputMessageFile but the File is not being populated. All the references on books online say to put the file path in the -Output parameter but when I do it says it can only hold an integer value. So I cant see the errors generated by the database engine.



Could anybody please assist with this issue?



Thanks

View 1 Replies View Related

Merge Replication Between SQL Server 2005 And SQL Mobile

Oct 18, 2007

Hi,

I'm currently investigating the feasibility of having SQL Mobile on a number of devices running Windows CE. These devices will have to synchronize with the server (either using merge replication or RDA) over GPRS. The problem I have is that some of these devices will never be online. Is there are a way of synching these offline devices? The model I had in mind was using a USB key (or some other storage device) to download the latest updates from an online device and transferring this data to the offline device, and vice versa e.g. from offline to online and then merging. Is this feasible?

Thanks

Csharper

View 2 Replies View Related

Error In Merge Replication While Server Syncs

Jun 22, 2006

At first we received error like

"The merge process could not retrieve identity range resource for table..."

then after solving this error we again started syncing of servers manually then we got some other error like

"the process could not enumerate changes to the subscriber".

We tried our best to solve this problem but some error appears each time like

"The process could not deliver the snapshot to the Subscriber."

"The schema script 'sync -t"Design" -o"dbo" -d"\ECOSYSTEMD$FTPMSSQLEcoSystemftpECOSYSTEM_MLEcosystem_MLEcosystem20060619204802Design_1337.bcp" -hORDER( [intDesignId] ASC)' could not be propagated to the subscriber"

again identity erroe emerges and agin we do the same process.

How to solve these problem?

View 1 Replies View Related

SQL Server 2008 :: Merge Replication - Replacing A Subscriber

Mar 4, 2015

We have a central office with a SQL2005SP4 server (yeah, I know... old as heck) that's the main database and it has multiple subscribers in regional offices. Well... one of the regional offices server is failing, and it needs to be replace.

The original server is an ancient Win2003 86x

The Server team will build a new Win2008r2 64x, and use the same name and IP address

And I'm tasked with the SQL part.

I'll be installing the same version/patch of SQL, but 64x instead, and migrate all databases, including the system databases.

How do I handle replication? Do I need to reintialize from scratch? or can I just use the backup as a starting point?

View 1 Replies View Related

SQL 2012 :: Complex Filter For Server Merge Replication

Jul 26, 2015

We have a table in an SQL Server 2012 database that stores tree-like structures. Simplified for the purpose of my question, it has the following format:

Id int identity,
ParentId int,
GroupId int

Each record of the table represents an object identified by Id. An object may or may not have a parent in the same table, such that object.ParentId = parentObject.Id. A root object has ParentId = NULL. There are multiple root objects, so the table in fact stores multiple trees. What’s important is that the tree depth is not fixed, i.e. theoretically there can be any number of ancestor generations for an object. GroupId is a property of a root object; in theory none of the children of a root object has to have GroupId <> NULL; it can be assumed that any child has the same GroupId value as its root object.

A sample table having two roots (one grandparent and one parent), one non-root parent/child and 4 child roots:

Id ParentId GroupId
----------------------------------------------------------
1 NULL 200 root grandparent
2 1 NULL non-root parent/child
3 2 NULL child
4 2 NULL child
5 NULL 300 root parent
6 5 NULL child
7 5 NULL child

The table is not normalised, i.e. there’s no separate {root_object : group} table. However I don’t think normalising the table would solve the problem.

Now the problem. We need to set up merge replication from the table above (Master table) to the table of the same format in another DB. We need to replicate only those rows of the Master table that have a certain fixed GroupId value, e.g. 200 in the example above. If we ensure that GroupId in all descendant objects of a root object has the same value in the table as the root object itself that would be trivial. The table would look like this:

Id ParentId GroupId
----------------------------------------------------------
1 NULL 200 root grandparent
2 1 200 non-root parent/child
3 2 200 child
4 2 200 child
5 NULL 300 root parent
6 5 300 child
7 5 300 child

And the filter would look like this:

WHERE GroupId = 200

However out of performance considerations, we would like to avoid if possible filling GroupId for the descendant objects, because as it must be clear from the above, GroupId for a descendant object is quite easily deducible via a stored procedure or UDF (just need to go up the tree until ParentId = NULL). The problem is, I don’t know how to achieve this in a merge replication filter: it would only allow WHERE conditions and joins. I’ve have not had much luck with joins for merge replication in general, but here we have more complex algorithm, because the number of tree levels can be different for every object. And merge replication would not allow using UDF…

View 2 Replies View Related

How To Handle Schema With Sql Server 2000 Merge Replication

May 29, 2007

I have a problem with sql server merge replication in sql server 2000.
If my db owner €œdbo€? and replication setup under €œsa€? account it works with out any problem. But when I use another db owner it can not work properly.
For an example I have customer table ([dbo]. [Customer]) When I setup merge replication under sa account it€™s work properly.
Again I was setup merge replication using another db owner ([INV]. [Customer]) It doesn€™t work.

View 3 Replies View Related

SQL Server Compact Edition Merge Replication Error

Feb 27, 2007

Hi
I am trying to complete sql server compact edition book online walkthrough "Creating a Mobile Application with SQL Server Compact Edition". I am successful to complete it as guided using all default settings (e.g. anonymous access, windows authenticaion etc.) and the sample run on both emulator and my pocket pc svc5000. I have following configuration..

Windows 2000 professional sp4
Sql server 2005 standard edition sp1
VS 2005 profesional edition (sp1 not installed)
Sql server compact edition
Sql server compact edition server tools

But the problem is that in production environment i will not be able to connect to the sql server using named instance (e.g machine_nameinstance_name). i have to use ip address in that situation. so i tried to modify the sample to use ip address in place of named instance and then the problem starts.. I have configued my sql server to allow remote connections using tcp/ip and named pipes using sql surface area config tool.

When using named instance i used following code to Synchronize with sqlserver 2005 with and it worked perfectly :

Dim filename As New String("Program FilesTestTest.sdf")
Dim repl As New SqlCeReplication()
repl.InternetUrl = http://machine_name/Test/sqlcesa30.dll
repl.Publisher = "machine_nameinstance_name"
repl.PublisherDatabase = "Test"
repl.PublisherSecurityMode = SecurityType.NTAuthentication
repl.Publication = "Test"
repl.Subscriber = "Test"
repl.SubscriberConnectionString = "Data Source='" + filename + "';Password='';Max Database Size='128';Default Lock Escalation ='100';"
Try
repl.AddSubscription(AddOption.CreateDatabase)
repl.Synchronize()
Catch err As SqlCeException
MessageBox.Show(err.ToString)
End Try

When i tried to do replication using ip address it shows following error:

System.Data.SqlServerCe.SqlCeException was unhandled
  HResult=-2147467259
  Message="Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect."
  NativeError=29061
  Source="Microsoft SQL Server Compact Edition"
  StackTrace:
       at System.Data.SqlServerCe.SqlCeReplication.Synchronize()
       at TEST.MainModule.Sync()
       at Test.MainModule.Main()

I am using following code to connect using ip address:

Dim repl As New SqlCeReplication()
repl.InternetUrl = http://XXX.XXX.XXX.XXX/test/sqlcesa30.dll
repl.PublisherNetwork = NetworkType.TcpIpSockets
repl.PublisherAddress = "XXX.XXX.XXX.XXX,XXXX"
repl.Publisher = "SQL2005"      'instance name of sql in sql2005
repl.PublisherSecurityMode = SecurityType.NTAuthentication
repl.PublisherDatabase = "Test"
repl.Publication = "Test"
repl.Subscriber = "Test"
repl.SubscriberConnectionString = "Data Source='" + filename + "';Password='';Max Database Size='128';Default Lock Escalation ='100';"
repl.AddSubscription(AddOption.CreateDatabase)
repl.Synchronize()


I have give rights to iuser_manchine_name in the public access list of publication and on database also.

I don't have any idea on where i am wrong... Please help soon..
Many thanks in advance..

View 1 Replies View Related

Microsoft SQL Server 2005 RTM Merge Replication Issues

Jan 9, 2007

We are trying to implement merge replication between 2 servers. Database size is around 11GB.

When I tried to create publication, snaphot agent is failing with following errror.

Error: 14151, Severity: 18, State: 1.
Replication-Replication Snapshot Subsystem: agent NBTENTSQL1X-PayDirectWeb-PayDirectPub-2 failed. The
replication agent had encountered an exception.
Source: Replication
Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentSqlException
Exception Message: String or binary data would be truncated.
Cannot find the object 'MSmerge_sel_4D388


The table where the snapshot is breaking contains around 169 columns. Can someone please help me get through this error ?





View 6 Replies View Related

Optimising Merge Replication For Both Server And Client Subscribers

Jan 4, 2007


I need to merge replicate data to two different types of subscribers:

Clients subscribers which will have a very small percentage of the data from the central database. The data on these machines will be managed using dynamic filtering on host_name()
Server subscribers which will manage a copy of all the data from the central database
There will be far fewer server subscribers than client subscribers.

As I see it I have two options for the configuration
1) Use two separate merge publications €“ one which is filtered and one which isn€™t
2) Use a single merge publication and setup the filtering so that the server subscribers receive all the rows

Which option is likely to lead to better performance?

With option 1) there would be 2 complete sets of replication metadata which need to be maintained €“ so I am tending towards option 2. Are there any disadvantages in using a dynamic filter to return a very large number of rows?

View 6 Replies View Related

Sql Server Merge Replication Vs. Sql Server Transactional With Updatable Subscribtion

Jun 12, 2006

Hi,

Transactional replication allows updatable subscriptions where changes at the subscriber are replicated up to the publisher, this can happen via Immediate Updating subscriptions, Queue subscriptions and P2P (new in SQL 2005), all forms of Transactional replication.

Any compared document between merge replication and Transactional with updatable subscribtion ?

Thanks,

Tarek Ghazali

SQL Server MVP

View 4 Replies View Related

SQL Server 2014 :: Merge Replication Synchronization In Stored Procedure

Oct 24, 2014

I'm updating some tables in a subscriber database with a stored procedure. After the tables get updated I'd like to sync them with the other subscriber dbs and the publisher db in that same stored procedure.I can do it manually in SSMS with the View Synchronization method. Are my only alternatives a batch job or C#?

View 1 Replies View Related

SQL Server 2008 :: Changing Alt Snapshot Folder For Merge Replication?

Sep 22, 2015

I have a merge replication. Currently works fine. Publisher & Distributor are on the same server. I need to change the location of the alternate folder for the snapshot files.

I’ll probably just change it through the GUI, but would I use sp_changedistpublisher or sp_changemergepublication if I were scripting everything?

My real concern is the subscribers. Do I have to ‘tell’ the subscribers where the alt folder has been changed to? Do I just run sp_changemergepullsubscription on the subscribers?

View 1 Replies View Related

SQL Server 2008 :: Merge Replication - Publisher And Subscriber On Same Computer?

Nov 6, 2015

For study effect, can I configure merge replication using just one SQL Server Instance?

View 3 Replies View Related

Merge Replication 32-bit IIS - 64-bit SQL Server 2005 -Windows Mobile 5 Device

Nov 15, 2006

We have setup a 32-bit IIS server on a 32-bit machine. Installed necessary SQL Server components (32-bit replication components). We have installed SQL Server 2005 64-bit SP1 with latest hotfixes on a 64-bit machine.

On the Mobile device we installed SQL Server 2005 Mobile.

When we start mergereplication the problem we have is error 28009 (An instance of the SQL Server Reconciler cannot be created) on the mobile device. I read allot about it, but still have a questetion.

Should this work?

I found the doc: SQL Server 2005 Upgrade Technical Resource Guide:
Note: If your upgrade involves SQL Server CE subscribers, you must perform additional actions on the IIS server. You will need to install SQL Server 2005 client connectivity components along with SQL Server Mobile Edition components on the IIS server. You will also have to replace sqlcesa30.dlll, sqlcerp30.dll, and all the replication components on the IIS server.

From this I conclude it should work or is the doc in error?

If it does not, what can we do?

32-bit SQL Server 2005 on the 64-bit machine should work. (Can a 64-bit SQL Server 2005 run alongside 32-bit SQL Server 2005?).

Beste regards,
Hans Mank

View 1 Replies View Related

Developing Microsoft SQL Server CE 2.0 Merge Replication Using .NET Compact Framework

Aug 13, 2007

We are developing Microsoft SQL Server CE 2.0 Merge Replication Using .NET Compact Framework. There is need of sinhronizations between SQL 2005 Mobile Edition witch resides on Barcode terminal (Windows CE) and SQL 2005 Developer Edition (on Windows XP). Everything is done by the book. There is few lines of code that we are using:
public bool Replicate()
{ bool ret = true;
SqlCeReplication repl = null;
try {
// Instantiate and configure
SqlCeReplication object repl = new SqlCeReplication();
string dbFile = ........
repl.InternetUrl = this.InternetUrl;
repl.InternetLogin = this.InternetLogin;
repl.InternetPassword = this.InternetPassword;
repl.Publisher = this.Publisher;
repl.PublisherDatabase = this.PublisherDatabase;
repl.PublisherLogin = this.PublisherLogin;
repl.PublisherPassword = this.PublisherPassword;
repl.Publication = this.Publication;
repl.Subscriber = this.Subscriber;
repl.SubscriberConnectionString ="Data Source=" +dbFile;
if (!System.IO.File.Exists(dbFile))
{ repl.AddSubscription(AddOption.CreateDatabase);
}
repl.Synchronize();
}
IIS is configured, but in log on the server we've got this error:
2007/08/09 15:33:02 Hr=80004005 ACK:Error for DistributorSessionID = 58 2007/08/09 15:33:02 Hr=80004005 The SQL statement failed to execute. [,,,SQL statement,,] 28560 Please give us posible solution of this problem, we have searched on forums but with no result. p.s. I'ts urgent

View 3 Replies View Related

SQL Server 2005 Merge Replication Without A Hard Coded Password

Jan 10, 2007

Hi. I've looked all over MSDN, newsgroups and the web but I can't find the answer to a problem that I am having.

The application that I am working on used both transactional and merge replication. I want to avoid hard coding passwords into an application that kicks off the pull replication on the client machine.

The client machines are all using SQL Server 2005 Express. The other machine is running SQL Server Standard. The passwords and login details are specified in the subscription properties in the Management Studio.

A fragment of the code is posted below. The transactional sychronization works fine without having to specify any passwords - however the merge replication does not work if both of the passwords are not specified.

private void SynchButton_Click(object sender, EventArgs e) { // Set up the subscriber connection details. subscriberConnection = new ServerConnection(subscriberName); try { // Connect to the Subscriber. subscriberConnection.Connect(); // Do the transactional subscription synchronisation independantly of the // merge subscription replication. try { transPullSubscription = new TransPullSubscription(subscriptionDbName, publisherName, publicationDbName, transPublicationName, subscriberConnection); // If the pull subscription and the job exists, start the agent job. if (transPullSubscription.LoadProperties() && transPullSubscription.AgentJobId != null) { TransSynchronizationAgent transSyncAgent = transPullSubscription.SynchronizationAgent; transSyncAgent.Synchronize(); } else { } } catch (Exception ex) { } // Do the merge subscription synchronisation independantly of the // transactional subscription replication. try { // Set up the subscription details for the merge subscription (bi-directional data) mergePullSubscription = new MergePullSubscription(subscriptionDbName, publisherName, publicationDbName, mergePublicationName, subscriberConnection); // If the pull subscription and the job exists, start the agent job. if (mergePullSubscription.LoadProperties() && mergePullSubscription.AgentJobId != null) { MergeSynchronizationAgent mergeSyncAgent = mergePullSubscription.SynchronizationAgent; mergeSyncAgent.DistributorPassword = "<<password>>"; mergeSyncAgent.PublisherPassword = "<<password>>"; mergeSyncAgent.Synchronize(); }etc etc..

Any help or suggestions will be greatly appeciated. Thanks.

View 8 Replies View Related

Merge Replication Error: 'Failure To Connect To SQL Server With Provided Connection

Mar 6, 2007

Hi!I´m trying to create a merge replication publication for a SQL MobileApplication .Everything works fine creating the publication and I'm able to dothehttp://xxx.xxx.xxx.xxx/aaaaaaa/sqlcesa30.dll, and it display's the"sql server mobile server agent 3.0".But when I run the application on the PDA and it´s doing thereplication it appears the following error:'Failure to connect to SQL Server with provided connectioninformation . SQL Server does not exist , access is denied becausetheIIS user is not a valid user on the SQL Server , or the password isincorrect' .any idea of which could be the reason...?Thanks in advance!!!

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved