Tuesday, March 20, 2012

Replication Problem

Hello,
I did the replication like it is quoted in my .NET CF Programming with C# -
Book and on this
<a
href=http://msdn.microsoft.com/SQL/SQLCE/default.aspx?pull=/msdnmag/issues/03/09/datapoints/default.aspx> ReplicationExample</a>
site, because i want to go through the sample of this site.
But it were to good to be true if all would be work, when i deploy the
sample application from this site on the Emulator and presses the
Synch-Button of the application, the following error occurs in a message box
on the display:
Error #1 of 2
Error Code: -2147467259
Message: SQL Server CE encountered problems in opening the SQL Server CE
database. [,,,Database name,,]
Minor Err.: 28559
Source: Microsoft SQL Server 2000 Windows CE Edition
Error #2 of 2
Error Code: -2147467259
Message: There is a file sharing violation. A different process might be
using the file. [,,,,]
Minor Err.: 25035
Source: Microsoft SQL Server 2000 Windows CE Edition
Error Paramter :\program files\CF\Inventory\TestDB1.sdf
I have changed the replication properties of the replication in the
sample application in that way:
SqlCeReplication oRpl = null;
try
{
Cursor.Current = Cursors.WaitCursor;
btnSynchronize.Enabled = false;
//Set up the Replication properties
oRpl = new SqlCeReplication();
oRpl.Publisher = "MachineName";
oRpl.PublisherLogin = "Username";
oRpl.PublisherPassword = "password of the user";
oRpl.InternetUrl = "http://MachineName/sqlce/sscesa20.dll"; // I do not know
if this path is correct.
oRpl.InternetLogin = "iusr_MachineName";
oRpl.InternetPassword = "";
oRpl.Subscriber = "CESubscriberTest";
oRpl.Publication = "NorthwindPub";
oRpl.PublisherDatabase = "Northwind";
oRpl.SubscriberConnectionString =
"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Dat a Source=" + this.m_sDataSource;
....
The strange thing is that in this code sample there is no method or anything
else for subscription..?
Do you know any ideas that this application would work without these problems?
regards
patrick
Hello,
I still work on the sample from this site
http://www.msdn.microsoft.com/SQL/SQ...s/default.aspx to get work on my local machine and on my PocketPc.
I have now changed the sample code once more a little bid in that way:
//Set up the Replication properties
oRpl = new SqlCeReplication();
oRpl.Publisher = "ACHATSCHITZ";//achatschitz is my MachineName
oRpl.PublisherLogin = "sa"; //sa is the user to gain access to a database of
the SQL Server with the sa as passwod.
oRpl.PublisherPassword = "sa";
oRpl.InternetUrl = "http://ACHATSCHITZ/pat/sscesa20.dll"; //pat is the alias
of my created virtual directory.
oRpl.InternetLogin = "iusr_ACHATSCHITZ";
oRpl.InternetPassword = "";
oRpl.Subscriber = "CESubscriberTest";
oRpl.Publication = "NorthwindPub";
oRpl.PublisherDatabase = "Northwind";
oRpl.SubscriberConnectionString =
"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Dat a Source=" +
this.m_sDataSource;
DialogResult oResponse = DialogResult.Yes;
But i still receive two errors when i execute the application:
Error #1 of 2
Error Code: -2147467259
Message: A call to SQL Server Reconciler failed.[,,,,]
Minor Err.: 29006
Source: Microsoft SQL Server 2000 Windows CE Edition
Error #2 of 2
Error Code: -2147201001
Message: The process could not deliver the snapshot to the Subscriber.
Minor Err.: 0
Source: Merge Replication Provider
I looked already in the msdn for these errors but i did not find something
useful. Hopefully anybody can help me because i think i will not able to work
it out without any help from here.(
regards
patrick
PS: The only settings for the Replication i made were the creation of the
virtual directory and the creation of the publication, as quoted in your
doc-file and in the quoted url at the top of my posting.
|||I get it!!! Now it works, i had to add the IUSR_Achatschitz to the
Adminstratoren group.
Which files or directories actually do i consider in the context of the
replication? - means which files or directories are created or updated in
context of replication?
regards
patrick
|||When your PocketPC connects with the web server it executes an isapi dll. I
believe it only needs read and execute permission on this virtual directory
and the underlying files and folders.
You also have an option on where to place your snapshot and the sharename
for the snapshot. Here you need read and list permissions.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"pat" <pat@.discussions.microsoft.com> wrote in message
news:6E6F647D-BA12-4045-B8ED-29E2227B6A50@.microsoft.com...
> I get it!!! Now it works, i had to add the IUSR_Achatschitz to the
> Adminstratoren group.
> Which files or directories actually do i consider in the context of the
> replication? - means which files or directories are created or updated in
> context of replication?
> regards
> patrick
>
|||Okay thank you very much. Can you please explain me what additional things i
have to do when i want to synchronise my PocketPc SQL Server Ce Database with
a SQL Server Database on the Desktop via WLAN?
thanks in advance.
regards
patrick
|||You need to build an app to do the pull. This app has to be configured to
download the publication.
You have to build your publication and enable it for anonymous pull, and for
SQL CE subscribers. You have to configure your IIS Server to have a snapshot
share which is accessible by the SQL CE device. You also have to configure
the publication to deposit the snapshot files in this location.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"pat" <pat@.discussions.microsoft.com> wrote in message
news:A7A03E23-83CB-499D-B0A0-544B1627D704@.microsoft.com...
> Okay thank you very much. Can you please explain me what additional things
i
> have to do when i want to synchronise my PocketPc SQL Server Ce Database
with
> a SQL Server Database on the Desktop via WLAN?
> thanks in advance.
> regards
> patrick

No comments:

Post a Comment