Is 2005 Merge Replication Reliable For Compact Edition Subscribers On WinXP Tablets Over VPN?
Oct 24, 2007
I posted a more detailed technical question a couple of weeks ago
with Subject = "Compact Edition 2005 Subscribers - Merge Agent failed after detecting that retention-based cleanup has deleted metadata"
But I got no replies.
Now my question is simpler: Is SQL Server 2005 Merge Replication reliable with Compact Edition subscribers on WindowsXP tablets?
We deleted all users' local databases a couple of weeks ago, and republished two publications with retention = 60 days.
Now we have at least one user who can't sync with the server, and replication monitor shows the error below.
But if she e-mails her sdf file to a support person, they can successfully sync her database.
We're sure that it's not a permissions issue, which is a normal suspicion when one user can perform a task that another can not.
It doesn't seem like a retention problem, because she's well inside the retention period.
She can successfully sync with the publication with upload/download tablers, but not with the publication with download only tables. Both publications were created on the same day, by the same DBA, with nearly identical properties.
This problem user has operated in the past with no problem, and she's configured identically to all of the others. It just seems like random flakyness with merge replication for Compact Edition subscribers.
I feel stupid saying that, because it sounds like I believe in a magical ghost in the machine. So my question is - IS MERGE REPLICATION A LITTLE BIT FLAKY FOR COMPACT EDITION SUBSCRIBERS ON XP MACHINES?
We've applied SP2 to the server, but no subsequent HotFixes.
We're trying to sell users and management on developing a larger occasionally connected system with the same replication scheme, so we need to know if it deserves our confidence.
Error messages:
The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the Publisher for changes not yet sent to the Subscriber. You must reinitialize the subscription (without upload). (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199402)
Get help: http://help/MSSQL_REPL-2147199402
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..
I have been following the MS on-line tutorials to get replication setup between SQL Server 2005 and SQL Server Compact Edition. I get to the point where I run the Configure Web Synchronization and it is running through the process where it is doing the automated configuration of the shared directory - assigning users etc.
I have attempted this step with a user account that I expressly created for snapshots and with the Administrator account and get the following error message:
* The operation completed successfully. (Exception from HRESULT: 0x80070000)
At first, I thought this was a rights issue due to the fact that I was using an account that I manually created. However, by using the Administrator account (test only until I can figure this out) that should have removed any rights issues associated with accessing the shared directory where the snapshot will reside.
Any help in getting this figured out will be greatly appreciated.
David L. Collison Any day above ground is a good day!
Hi All ...I have been following the MS on-line tutorials to get replication setup between SQL Server 2005 and SQL Server Compact Edition. I get to the point where I run the Configure Web Synchronization and it is running through the process where it is doing the automated configuration of the shared directory - assigning users etc.I have attempted this step with a user account that I expressly created for snapshots and with the Administrator account and get the following error message:* The operation completed successfully. (Exception from HRESULT: 0x80070000)At first, I thought this was a rights issue due to the fact that I was using an account that I manually created. However, by using the Administrator account (test only until I can figure this out) that should have removed any rights issues associated with accessing the shared directory where the snapshot will reside.Any help in getting this figured out will be greatly appreciated.David L. Collison Any day above ground is a good day!
I am trying to create Replication Topology (Merge Replication) like below.
Subscriber1 --> Publisher <-- Subscriber2.
I have created both subscribers with Subscription Type as Server with Priority as 75. I am updating the Column A of Row_10 in Subscriber1 on time say 11 am. After i am running the Starting synchronizing agent from Subscriber1. The value propagated to Publisher now publisher contains the latest value in Column A. Uptonow the Subscriber2 is not synchronized with Publisher.
Now in Subscriber2 also Column A of Row_10 is updated say at 11.10 am. Actually now Publisher contains the value from Subscriber1 for that Column and in Subscriber2 we have the same column updated.
Now i am running the Synchronization in Subscriber2, i am getting the result which is not expected. Here Publisher's value is propagated to Subscriber2. But as per real scenario Subscriber2 has the Latest value which is updated on 11.10 AM.
I don't know what am i missing here. Actually merge replication should see the time stamp and it has to decide winner. But here it always considers publisher as a winner and puts the data to Subscriber.
I read the BOL on how the publisher will had out identity ranges to subscribers, but it was not clear if this was also the case for anonymous subscribers. Will merge replication with identity columns work with anonymous subscribers that sync via HTTPS?
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?
I just want to display all the data of a Single table into a Data Grid, I know that we can drag and drop the table on to a form and datagrid is generated, but here I want to retrive those values through my code, how should i do that
I am getting following errors while running the program Error 1) Error No. 28037, MS SQL Server 2005 Evrywhere Edition Error: A request to send data to the computer running IIS has failed. For more information see HRESULT Error 2) Error No. 0, SQL Server 2005 Evrywhere Edition ADO.Net Data Provider Error: The specified table does not exist [ JobLists ].
Can anybody please tell me, where I went wrong ??? In this code anywhere else????
Note: While adding a Data Source of SQL Server 2005 Mobile Edition, I have added that .sdf file into my project, thats why I have written the Data Source as : .DbFile.sdf
@"Data Source = .DbDotNetCF.sdf";
The code is as follows:
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 DeviceApplication1 { public partial class Form1 : Form { string filename = @".DbDotNetCF.sdf";
private DataSet dsJobLists;
public Form1() { InitializeComponent(); }
private void DeleteDB() { if (System.IO.File.Exists(filename)) { System.IO.File.Delete(filename); } }
private void Sync() { SqlCeReplication repl = new SqlCeReplication();
if (DbDotNetCFDataSetUtil.DesignerUtil.IsRunTime()) { // TODO: Delete this line of code to remove the default AutoFill for 'dbDotNetCFDataSet.JobLists'. this.jobListsTableAdapter.Fill(this.dbDotNetCFDataSet.JobLists); } } } }
I have created a merge replication correctlly( I suppose, there were no errros) Please help
What I need is to make sure that in case if my Windows CE based device lost power supply my SQL Compact 3.5 database will not be corrupted and I can read data from it. Has anybody any experience in this area?
This is critical requirement for our project and I want to know it is feasible or not.
We are developing a system which will have to support more than 3000 subscribers. We will have to support both Transactional replication and Merge replication.
I checked the following document about SQL 2005 replication <http:// www.microsoft.com/technet/prodtechnol/sql/2005/mergrepl.mspx>. The document does not clearly specify what is the maximum number of subscribers supported without a significant performance degradation.
The questions i have are: 1. Given the fact that there will be more than 3000 subscribers, there will be more than 500-1000 subscribers trying to replicate at the same time. Will be there be a performance degradtion in such a scenario
2. Has anyone used SQL Server 2005 in a scenario involving more than 3000 subscribers?
3. Will it be better if we develop our own system to perform replication activity instead of relying on SQL Server 2005?
- Ngm
Mail me atnarasimha (DOT) gm (AT) gmail (DOT) com )
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
we've got a SQL Server 2005 which replicates with an SQL Server Compact 3.5. Every 10 to 20 synchronisations we're getting the error mentioned above. A Soft reset of the device helps to make the synchronization working again.
Why is this error happening and how can we resolve this?
BTW, we've also running system that replicates with an SQL Server Compact 3.0 without having this problems.
Hello, How are you? I have a problem when I try to create a new connection with Microsoft SQL Server 2005 Compact Edition from Visual Studio 2005 IDE. When I€™m going to choose the data source, the SQL Server 2005 Compact Edition provider doesn€™t appear in the list. I installed the SQL Server 2005 Compact Edition from this page http://www.microsoft.com/downloads/details.aspx?FamilyId=%2085E0C3CE-3FA1-453A-8CE9-AF6CA20946C3&displaylang=en. In the additional information says by installing SQLServerCE31-EN.msi installs the provider (System.Data.SqlServerCe.dll) in the GAC (global assembly cache) and registers the OLEDB provider (sqlceoledb30.dll). So, I don€™t understand why couldn€™t I create a new connection with Microsoft SQL Server 2005 Compact Edition from Visual Studio 2005 IDE?
==> Is there anything else missing if I intend to use it for development with Visual Studio 2005 (VC++)?
==> What is "Microsoft SQL Server 2005 Compact Edition Developer SDK" compared to the one "SQL Server 2005 Compact Edition" I installed? Should I install it?
3- There is also a link, which btw doesn't work at all, that should allow me to download following item:
"Microsoft SQL Server 2005 Compact Edition Tools of VS 2005 sp1"
==> Not being able to have any infos about it, what is the use of it? Should I install it in my environment? If so, any working link where I can download it from?
4- I finally noted, while browsing through SQL Server 2005 CE books online, the following note:
The following programming models are supported by SQL Server Compact Edition:
ADO .NET, accessible by using C# or Microsoft Visual Basic
OLE DB, accessible by using Visual C++ option from within Visual Studio 2005
==> How come that CE is not accessible using ADO.NET model when using VC++?
My application uses Sql server 2005 Mobile edition and I want to change to
Sql server 2005 Compact edition.
I have an application that automatically upgrade new version of my software at users (customers sites) It is shipped on a memrory card (SD Card).
I want in my upgrade tool to install Sql server 2005 Compact edition so I do it by running the two cab files :
sqlce30.repl.wce5.armv4i.CAB and sqlce30.wce5.armv4i.CAB
It works ok but I want also to uninstall Sql server 2005 Mobile edition and I do not find out how to do it automatically, First I do not know how to find out if Sql server 2005 Mobile edition is installd and if so how to uninstall it.
I want to do it all automatcally in my upgrade utility because my customers do not know to do it manually by theself.
Second I want to know if I have to use the Sql server 2005 Compact edition Uprade tool to upgrade my clients old databases because the now application works ok without Upgrading the database.
Hi Can we use Top Clause in the Select statement while using SQL Server 2005 Compact Edition. If not, is there any other workaround available to achieve same results.
I'm building my app in the full blown MS SQL 2005 Standard Edition as our new app will have a enterprise version using SQL 2005 and a desktop version using either SQL Compact Edition 2005, VistaDB3, or maybe even (uggh) SQL Express 2005. I would prefer SQL Express 2005 but the install size of my app + DB would kill sales.
Back to my question. I'm building out the schema in the full SQL 2005, how do I take this schema and get the schema applied to a SQL Compact Edition DB?
I want to synchronize sql 2005 CE edition with SQL 2000.before this i was using sql ce 2.0 and i manage to synchronize with sql 2000.the codes which i used for synch i am specifying below.
Private Const INTERNETURL As String = "http://ihsan/THPMIS/sscesa20.dll"
Private Const PUBLISHERSERVER As String = "IHSAN"
Private Const PUBLISHERDATABASE As String = "THPMIS"
Private Const PUBLISHERSECURITYMODE As SecurityType = SecurityType.NTAuthentication
Private Const PUBLICATION As String = "THPMIS"
Private SUBSCRIBER As String = Dns.GetHostName()
Private Const LOCALDATABASE As String = "My DocumentsTHPMIS.sdf"
while i am using sql 2000 with sql CE 2005 it is giving an error unknown connection option in connectionstring:provider. can any one give me some suggession how to solve this problem
I want to learn if it is possible to develop applications for SQL Server 2005 Compact Edition using .NET Compact version 1.0. The major doubt is the possibility for version 1.0. It is reasonable to deliver SQL Compact Edition redistributables with an application, but this is not great to require ,NET 2.0.
I'm trying to use application designed for 32bit operating system on 64bit (Longhorn beta 2). This application requires SQL Server CE 2005, I installed it (x32) but the application still says that it isn't.
What can be the problem? I suggest the application cannot retrieve information about SQL Server CE installation. But maybe the reason is I need to install something like SQL Server CE for 64bit operating system? Is it present "in native"?
everything is ok for first run. but i leave the program relogin than that error occured ppc2003 second edition devices. Windows mobile 5.0 device works fine. can anybody help me?
VS2005 ver 8.0.50727 SSCE31VSTools-ENU.exe loaded SSCE31SDK-ENU.msi loaded
machine 1 SQL 2005 loaded
machine 2 http://192.168.20.22/ssce/sqlcesa30.dll "Microsoft SQL Server Compact Edition Server Agent" looks fine
pocket pc side C:Program FilesMicrosoft SQL Server Compact Editionv3.1SDKinwce400armv4
End Try ------------------------------------------------------------------------------ i added the following code to very beginning of my code too. that code lock my device
Declare Function LoadLibrary Lib "coredll" Alias "LoadLibrary" (ByVal lpLibFileName As String) As IntPtr
I have a computer thats running XP 64 bit version. I want to replicate between SQL server 2005 and SQL server 2005 compact edition. But it doesn't works. So i looked for a solution and i came to: http://support.microsoft.com/kb/912430 This page is telling me:
You cannot replicate data from SQL Server 2005 to SQL Server Compact Edition by using the 64-bit version of IIS
Is that a problem that can be solved by not using a other Operating System?
Or can you maybe install a 32-bit IIS on XP 64 bit?
I have a SQL Server 2005 (build 9.0.3050) database with tables belonging to different schemas. I am in the process of developing a Windows Mobile 5.0 application that will work against this database, and I€™m planning to use Remote Data Access with SQL Server 2005 CE to synch data.
I have my RDA all set up and working correctly IIS-wise, and have no problem pulling a table from my database. However, when I attempt to push a modified table back to the database, I get an €˜Internal error: Failure setting up bindings, possibly caused by insufficient permissions.€™ error (which equates to error 28621: SSCE_M_BINDINGS), which according to http://msdn2.microsoft.com/en-us/library/ms172898.aspx is an internal error which €œcannot be resolved by common troubleshooting techniques€?. The €˜insufficient permissions€™ is a red herring I think, since the problem persists even if the SQL Server login that is being used for RDA is in the sysadmin role.
I€™ve attempted to identify the problem by starting from scratch with a new database and a new table with a couple of test columns. With the table freshly created as dbo.TableName RDA works fine. However, when I create a schema and transfer the table to the schema, RDA push fails as above, so to me it looks like the schema is causing the problem.
Anyone any ideas about this? All help greatly appreciated!
I have a problem changing the language setting to swedish on sql server 2005 compact edition. The thing is that I'm using a language dependent format: '1998-02-28 14:23:05' (Numeric) when saving and I rather don't want to change this format, because it's a lot of work. (The default setting on the database seems to be us-english, which has the format month-day-year and there by gets wrong for me).
As I understand, this is detemined by the language settings on login. So I set this by using the 'locale identifier' (sv-SE) in the connection string to the CE database, but when I try to save the data, the datum is still interpreted as us-english format.
(The application I'm running have been upgraded from sql compacte edition 2.0 where this worked just fine, though without specifing any language settings in the connection string.)
OK I think I am missing something here. I have installed the newly released SQL Compact Edition, Server Tools, and Tools for VS SP1. According to the documentation you can do the following to create a SQL Compact Edition DB:
Creating a SQL Server Compact Edition database on the server
In SQL Server Management Studio, open Object Explorer.
In Object Explorer, click Connect, and then choose SQL Server Compact Edition.
In the Connect to Server dialog box, select <New Database€¦> from the Database file drop-down list.
In the Create New SQL Server Compact Edition Database dialog box, type a file path and file name for the new database file. You can optionally select the default sort order and choose whether you want to encrypt or password-protect the database. If you choose to encrypt or password-protect the database, type a password, and then click OK.
Click Connect to connect to the new SQL Server Compact Edition database. The database is now displayed in Object Explorer.
I see no reference to or any option to create or connect to a SQL Server Compact Edition database in SQL Mgmt Studio. I had SQL 2005 Mobile installed previously and this still shows as an option. What I am missing here? Is SQL Mobile now SQL Compact Editon?
We have a plan to use Microsoft SQL Server 2005 Compact Edition RC1 as a backend. Our Front-end is VS .NET (VB.NET).
We want to know how to edit the Compact Edition database (.SDF). Is there any editor is available right now in the market? or microsoft provided any editor for this.
OR Can i use microsoft 2005 sql server standard edition for this.
I am using a Compact Framework 2.0 on a mobile 5.0 with a local Microsoft SQL Compact Edition 2005 database. The backend database is a Microsoft SQL Server 2005 and I am trying to pull a 45000 rows table (the table has 2 varchars(8) forming a primary key and an INTEGER column).
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim DBPath As String
Dim mydr As XmlTextReader = New XmlTextReader(m_sXMLFileName) mydr.WhitespaceHandling = WhitespaceHandling.None
While mydr.Read() ' Look for the <configuration> section ' This lets us add several peices in the config file If mydr.Name = "DBPath" Then DBPath = mydr.Name End If End While mydr.Close()
Me.MobileDataTableAdapter.Connection.ConnectionString = "Data Source =""Program FilesCEdatabaseMobileDatabase.sdf"";" Try If MobileDatabaseDataSetUtil.DesignerUtil.IsRunTime Then 'TODO: Delete this line of code to remove the default AutoFill for 'MobileDatabaseDataSet.MobileData'. Me.MobileDataTableAdapter.Fill(Me.MobileDatabaseDataSet.MobileData) End If
Catch ex As SqlCeException MessageBox.Show(ex.Message) End Try End Sub