I'm trying to configure web synchronization using the wizard, It errors out on step "Setting The snapshot share permissions". The error I get is
The operation completed successfully. (Exception from HRESULT: 0x80070000)
Then all the other steps rollback. I'm using the default location for the snapshot i.e in REPLDATA folder. When creating the publication I used a UNC path to specify the snapshot folder. For testsing purposes I'm using a windows account that has admin privilages on the box that is running IIS. I'm just testing this merger replication over https, so I have IIS and the distributor on the same box. I created the publication, and the snapshot. I was walking through the wizard, all seems to be OK but can't get past this pesky error, which is strange seeing it says it complete successfully.
Help, any ideas

Web Synchronization wizard
Mark Groves
NOT FOR REPLICATION can be set when you are creating the constraint on the table. For example when you are creating the table on the publisher and adding the constraint, you need to tag it with NOT FOR REPLICATION.
@pre_creation_cmd='drop' means that the table will be tried to drop and recreate at the subscriber. Now if there are constraints on this table or other tables depend on this table, then it will fail to be dropped. That was what was happening in your case initially.
Typically you use this option (default) when you know that the subscriber will not have the table to begin with. And if you dont care the tables at the subscriber at this stage, you could manully drop all those tables and replication will re-create those tables and will pass.
However if you dont want to drop the tables at the subscriber, you should be using 'Keep existing object unchanged. This will tell replication agent to not touch the table schema or data. Note that if you had rows in this table at the subscriber (say with PK), replication will again fail because it will try to insert these rows and those rows are already present at the subscriber.
So you can either delete the data manually at the subscriber and rerun replication agent, it should pass. Or you can use the Delete data, ... and that way when replication agent runs, it leaves the table schema as is, deletes the data and goes about its business and it will pass.
So depending on your need and situation, you can use one of the above options and workarounds.
As far as the error: HRESULT. HRESULT 0x80072EE2 (28037)
I think, it is to do something with the connectivity to the IIS server. Are you able to see it consistently the first time you create subscription Can you browse to the IIS virtual directory successfully all the time Are you sure that there are no netwowrk problems
Raymundo Chapa G
I have the same problem in using Web Synchronization Wizard, after I changed the snapshot location in \\<MachineName>\mssql\, the problem had been solved. However, it create another problem, the snapshot agent could not generate snapshot folder. The error message is "The process could not create file '\\Developer4\mssql\unc'." and the error details is " Access is denied. (Source: (OS); Error number: 5)".
Please help, I have stuck in this problem for several days. Thank you.
Eddie
Boywonder0337
Mahesh, thank you for your reply. I have tried your suggestions. Actually I have already replicated every table because they all related. Secondly, I have set the following properties as “copy primary key constraint”, “Copy foreign key constraints”, “Copy check constraints”and “copy unique key constraints” as false in Article Properties Page. However, the same error happens again. Are there any other ways to “Make the constraints NOT FOR REPLICATION” In fact, there is no constraints value in the constraints folder for those tables that generate such error. I have no ideas why this happened.
You were right the default setting for properties of “Action if name is in use” in Article Properties Page is “Drop existing object and create a new one “, which generate the code as @pre_creation_cmd='drop'. So I have tried to change this setting as “Keep existing object unchanged” or “Drop existing object and create a new one”.
However, the new error appears as “The specified table already exists. [ accessType ] HRESULT 0x80040E3F (0)”
“The SQL statement failed to execute. [ SQL statement = CREATE TABLE "accessType" ( "accessTypeID" nvarchar ( 50 ) NOT NULL , "strAccessTypeDesc" nvarchar ( 50 ) NOT NULL , "rowguid" uniqueidentifier ROWGUIDCOL NOT NULL , CONSTRAINT "PK_accessType" PRIMARY KEY ( "accessTypeID" ) ) ]
HRESULT 0x80040E3F (28560)”
I have been tried this whole day and still can not get through it. Moreover, there is another strange thing. Every time after I open the SQL server management studio, the first time I tried to create the mobile subscription, I got the error as following:
“A request to send data to the computer running IIS has failed. For more information, see HRESULT. HRESULT 0x80072EE2 (28037)”
But the second time when I tried to create mobile subscription, there is no such error.
Please help, thank you very much.
Eddiefarzade
After I get new SD card, the error “there is not enough storage is available to complete this operation” has gone. Your were right, Mahesh. After I turn the turned off the firewall, the IIS connection works correctly. Now I can successfully synchronize my PDA with SQL server database, however, when I tried to do synchronization with another bigger SQL database (120MB), I got error as” The buffer pool is too small or there are too many open cursors. HRESULT 0x80004005 (25101)”. I have created the .sdf file with following C# code:
string connString = "Data Source='Test.sdf'; max database size = 300; max buffer size = 5024;";
SqlCeEngine engine = new SqlCeEngine(connString);
engine.CreateDatabase();
Morover, the synchronization always stop at the same table.
Please help, thanks
Pramod V
Mahesh, I have tried your suggestion today. But unfortunately I still have not figured it out yet. I could not delete any value of .sdf file in PDA subscriber from SQL Management Studio. So I created a new .sdf file for PDA subscriber without any value in the tables, but the same constraints error still keeps happening. Then I created a new empty .sdf file without any tables, however it ended up with another error something like “not enough memory”. But there are still 20 MB free storage in my PDA and about 2 MB free memory.
I think the property of “NOT FOR REPLICATION” must be set when creating publisher database, not at the time after the Database have been created. So I can not reset the constrains as “NOT FOR REPLICATION” after the database has been created or in publication. Am I right
For the error: HRESULT 0x80072EE2 (28037), Yes it quite often happen at the first time when I create subscription. But sometime only have constrain error (HRESULT 0x80040E90 (25077)). But I can browse to the IIS virtual directory successfully all the time. I synchronize the PDA with local PC. Moreover after the error: HRESULT 0x80072EE2 (28037), now I also got another error “Connection broken.HRESULT 0x80004005 (0)”. I use Anonymous IIS User account (IUSR_Machinename).
On the PDA, I had error like “there is Not enough storage is available to complete this operation.” Or “A problem has occurred with tdsserver.exe”
Please help, Thanks a lot.
Brian.Nelson
You are right. One is a share, the other is not.
When you configured replication, you provided a snapshot location. It is this location that you need to give the account running the sync acces to Read the snapshot files. And if it is going to be a remote machine, the only way it can access is through a share. So read permissions on this snapshot share location.
Carlos G. Sarmiento
I guess you are trying the location:
"d:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\repldata"
Can you instead try:
\\<MachineName>\mssql\ReplData
or
\\<MachineName>\mssql\
Andy Rivas - MSFT
what's different between :
"d:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\repldata"can i ask .
and
\\<MachineName>\mssql\
what i am understanding is that i need to create a shared folder mssql
what's permission do i set up for this shared folder.
thanks
nick
lgrainger
Try increasing your database size.
For eg:
"data source=D:\school\client\sub.sdf"; "Max Database Size = 1024; Max Buffer Size = 1024"
This should create a database of size 1024MB which should hold your data.
And try this: start clean
1. Delete your sdf files
2. Re-create your publication with all articles, and pre_creation_cmd=drop (default)
3. Create your database with the above modification to hold larger data
4. Synchronize.
Your problem with the virtual directory is most probably due to network issues.
Peter Richard
Rakesh Garg
Is your data more than 300MB
Try increasing both the data and the buffer. Hopefully that should solve.