Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Merge replication: The process could not read file ... due..

 
Goto page 1, 2
   Database Help (Home) -> Replication RSS
Next:  is server in mixed mode using TSQL?  
Author Message
Jeremy Sage

External


Since: Dec 22, 2008
Posts: 11



(Msg. 1) Posted: Mon Dec 22, 2008 1:40 am
Post subject: Merge replication: The process could not read file ... due to OS e
Archived from groups: microsoft>public>sqlserver>replication (more info?)

I have encountered this error after adding a stored procedure as an article
to a publication. Eventually, I found a workaround in the following forum
thread:
http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/thread/c38db202-4eb0-4c5b-bcb3-87649a465b22/#page:2

One post states that the issue is a bug that is fixed in SQL Server 2008.
There is a workaround of adding a dummy table to the publication which seems
a bit crude. Although I have managed to get the workaround to work OK on the
development server one poster says that the workaround did not work for them
and I am a bit nervous about implementing it in production. There does not
seem to be any additional information on this (that I can find).

Some questions:
- Is this really a bug in SQL Server 2005?
- Is there a hotfix or service pack that fixes the bug? If so should it be
applied to the server or clients?
- Would the workaround not succeed in certain situations? If so why and
what can be done?
- Are there any pitfalls of using the workaround?

(Server: SQL Server 2005 Standard, Clients: SQL Server 2005 Express, merge
pull subscriptions using web synchronisation)

Jeremy.

 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Jeremy Sage

External


Since: Dec 22, 2008
Posts: 11



(Msg. 2) Posted: Mon Dec 22, 2008 2:57 am
Post subject: RE: Merge replication: could not read file ... due to OS error 53 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Apologies, had not realised the original subject had been truncated. Should
read OS error 53.

 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 268



(Msg. 3) Posted: Tue Dec 23, 2008 1:25 am
Post subject: RE: Merge replication: The process could not read file ... due to OS e [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jeremy,
Thank you for using Microsoft MSDN Managed Newsgroup. My name is Charles
and I will assist you on this issue.

So far I have not found that this issue was documented as a bug since we
could not easily reproduce it at our side. so for your questions, please
see my answers as following:
Q: Is this really a bug in SQL Server 2005?
A: It is hard to say that now since we need to first reproduce this issue.
Could you please let me know what exactly your environment is and what your
steps are so that I can perform a test at my side for further check.


Q: Is there a hotfix or service pack that fixes the bug? If so should it be
applied to the server or clients?
A: No now.

Q: Would the workaround not succeed in certain situations? If so why and
what can be done?
A: It is not official workaround. We are not sure of that. You need to
perform tests at your environment to check if there are proper for you.

Q: Are there any pitfalls of using the workaround?
A: The pitfall is that we could not gurantee this workaround. You need to
perform tests to verify if the workaround is acceptable for you.

Please feel free to let me know if you have any other questions or
concerns.

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg.RemoveThis@microsoft.com.
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Jeremy Sage

External


Since: Dec 22, 2008
Posts: 11



(Msg. 4) Posted: Tue Dec 23, 2008 1:25 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Charles, thanks for your reply.

I don't know if you checked the forum thread that I referred to in my
original post but this seems to imply that a case was raised with Microsoft;
unfortunately there is no reference so I don't know how easy it would be to
track down the initial enquiry. That thread has several posts and may help
identify the critical factors that produce this error.

As far as I can see from my own experience and the other posts, the
following seem to be common:
- Server: SQL Server 2005 Standard edition
- Client: SQL Server 2005 Express
- Merge pull replication
- Web synchronisation (client on different network, synchronising over the
internet)
- Initial publication created (with tables and other articles) and clients
synchronising successfully
- Stored procedure (or udf) added as an article to the publication,
snapshot recreated and OS error 53 occurs on synchronisation
- Dummy table added as another article to the publication and the
synchronisation is successful

The error message posted in the thread I referred to is similar to the one I
experienced and implies that the snapshot file is successfully downloaded to
the client but the error occurs when trying to read the same file from the
server (all very confusing).

Please let me know if there is any more information I can provide.

Thanks in advance,
Jeremy
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 268



(Msg. 5) Posted: Tue Dec 23, 2008 5:26 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jeremy,
Yes, I checked the posts in the forum thread, however I need to first
confirm if your environment was same as theirs.

Could you please also let me know your security settings for your web
synchronization? Since your subscriber was in a different network from your
publisher, to avoid potential network credential authentication issues, I
recommend that you use SQL authentication (e.g. sa) to make connections
among publisher, distributor and your subscriber.

Thank you!

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg.DeleteThis@microsoft.com.
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Jeremy Sage

External


Since: Dec 22, 2008
Posts: 11



(Msg. 6) Posted: Tue Dec 23, 2008 5:26 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yes, using SQL authentication. Subscription set up on clients using
sp_addmergepullsubscription and sp_addmergepullsubscription_agent with
synchronisation performed using RMO in a .Net windows form application.
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 268



(Msg. 7) Posted: Wed Dec 24, 2008 3:25 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for your confirmation Jeremy. I will try to establish an environment
for test this. I may need one more day to finish establishing the
environment. However since I am not very familiar with .NET, if you could
send me (changliw_at_microsoft_dot_com) a test .NET application with RMO,
that will be greatly appreciated. Otherwise I will only use SQL Server 2005
built-in method for testing this web synchronization.

Thanks!

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg.TakeThisOut@microsoft.com.
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Jeremy Sage

External


Since: Dec 22, 2008
Posts: 11



(Msg. 8) Posted: Mon Dec 29, 2008 4:12 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Apologies for the delay due to the Christmas break. The best source for a
..Net example of using RMO for synchronising is:
http://msdn.microsoft.com/en-us/library/ms147890.aspx

If you need my actual code (which is based on this example) or the SQL
script for creating the subscription and/or publication then please let me
know.

Thanks,
Jeremy
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 268



(Msg. 9) Posted: Tue Dec 30, 2008 4:25 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jeremy,
Thank you for your posting back.

Per my test, this issue could not be reproduced in the same network at my
side with only SQL Server 2005 built-in method. I noticed that you said
that your client was on different network. May you let me know:
Are the two different networks both domain environment? If they are both
domain environment, did the trust relationship have been established
between the two domains?

Regarding the RMO application, since it is beyond my specialities, to avoid
introducing additional unexpected issues regarding .NET programming and
unneccessary efforts, I still recommend that you send me your test project
so that I can effectively perform a test to further check this issue.
Appreciate your understanding on this.

Thank you!

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg.RemoveThis@microsoft.com.
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Jeremy Sage

External


Since: Dec 22, 2008
Posts: 11



(Msg. 10) Posted: Wed Dec 31, 2008 3:42 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I think the fact that the client is on a different network is significant. In
this case the clients are not in a domain environment. They are simply using
web synchronisation to avoid that.

I will send by email the .Net RMO code that I am using plus the SQL scripts
for the publication and subscription.

Thanks for your help,
Jeremy
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 268



(Msg. 11) Posted: Mon Jan 05, 2009 5:25 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jeremy,
Happy New Year!
Sorry for delaying this response since I took the new year vacation in the
last week and just return to office now. I am performing the research with
your sample files now and will let you know what I find tommorrow. I
appreciate your patience.

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg DeleteThis @microsoft.com.
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 268



(Msg. 12) Posted: Tue Jan 06, 2009 9:41 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jeremy,
Based on your VB.NET code and the C# code in the article, I first wrote a
test C# application (since I have little experience of VB.NET), however I
could not synchronize it successfully. Based on my further research,
compared the settings with the settings in the subscription's Properties
window in SSMS, finally I found that the problem was caused by the fact
that I did not specify the publisher connection information and distributor
connection information. After I explicitly specify them, the
synchronization worked perfectly. The code is as following:

private void button1_Click(object sender, EventArgs e)
{
// Define the server, publication, and database names.
string subscriberName = "155952M4";
string publisherName = "155952M2";
string distributorName = "155952M3";
string publicationName = "MyReplPub";
string subscriptionDbName = "MySub";
string publicationDbName = "MyPub";
string hostname = @"155952M4";
string webSyncUrl = "https://" + distributorName +
"/Mywebsync/replisapi.dll";

// Create a connection to the Subscriber.
ServerConnection conn = new ServerConnection(subscriberName);

MergePullSubscription subscription;

MergeSynchronizationAgent agent;

try
{
// Connect to the Subscriber.
conn.Connect();

// Define the pull subscription.
subscription = new MergePullSubscription();
subscription.ConnectionContext = conn;
subscription.DatabaseName = subscriptionDbName;
subscription.PublisherName = publisherName;
subscription.PublicationDBName = publicationDbName;
subscription.PublicationName = publicationName;

// If the pull subscription exists, then start the
synchronization.
if (subscription.LoadProperties())
{
// Get the agent for the subscription.
agent = subscription.SynchronizationAgent;

agent.PublisherSecurityMode = SecurityMode.Standard;
agent.PublisherLogin = "sa";
agent.PublisherPassword = "P@ssw0rd";
agent.DistributorSecurityMode = SecurityMode.Standard;
agent.DistributorLogin = "sa";
agent.DistributorPassword = " P@ssw0rd ";

agent.OutputVerboseLevel = 1;
agent.Output = "";

// Synchronously start the Merge Agent for the
subscription.
agent.Synchronize();
}
else
{
// Do something here if the pull subscription does not
exist.
throw new ApplicationException(String.Format(
"A subscription to '{0}' does not exist on {1}",
publicationName, subscriberName));
}
}
catch (Exception ex)
{
// Implement appropriate error handling here.
throw new ApplicationException("The subscription could not
be " +
"synchronized. Verify that the subscription has " +
"been defined correctly.", ex);
}
finally
{
conn.Disconnect();
}

}

I removed those code lines within the scope of "if
(agent.PublisherSecurityMode == null)" because they never have opportunity
to be executed.

I configured my subscription on the subscriber in SSMS. Some important
settings are as following:
" Agent process account: 155952M4\Administrator (This is a local account
since it is not in my domain)
" Distributor connection and Publisher connection use "sa" as the login
account;
" Web server address: https://155952m3.chang.com/mywebsync/replisapi.dll
" Web server connection: Basic Authentication
----User name: Administrator
----Password: P@ssw0rd

One important thing you need to pay attention to is the connection settings
in Internet Explorer since they may impact the underlying API's behavior.
On your subscriber, open your IE, click Tools->Internet Options, switch to
the Connections tab, click LAN settings and check the following:
1. Ensure that "Automatically detect settings" is NOT checked.
2. If you use a Proxy server, ensure that you select "Bypass proxy server
for local addresses" and that your proxy server can parse the URL which is
used for web synchronization. Take my test for example, if the proxy can
recognize 155952M3, however cannot parse 155952m3.chang.com, it will not
work and you will need to contact your network administrator to handle
this.

Hope this helps. If you have any other questions or concerns, please feel
free to let me know.

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg RemoveThis @microsoft.com.
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Jeremy Sage

External


Since: Dec 22, 2008
Posts: 11



(Msg. 13) Posted: Tue Jan 06, 2009 9:41 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Charles,

Did you manage to reproduce the original problem of adding a stored
procedure to the publication and try synchronising again? If so, have you
identified the original problem and the fix? As per the original post(s) this
was generating a code 53 error.

Jeremy
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 268



(Msg. 14) Posted: Wed Jan 07, 2009 10:47 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jeremy,
Yes, I tried adding a new stored procedure to the articles, however I did
not reproduce your issue. Indeed with the existing code, I encountered an
error regarding that the schema script of a default constraint could not be
propagated to the subscriber. However the error is reasonable, since it is
lack of reinitialization after an new article added. I added the
"Reinitialize" function with the following code, and then it worked fine:
subscription.Reinitialize(false);

Please ensure that you follow the following process after you add a new
article:
1. On your publisher, in SSMS, expand Replication->Local
Publications-><your publication>, right click your subscription, click
"Reinitialize", check "Use a new snapshot" and check "Generate the new
snapshot now", and then click "Mark for Reinitialization";
2. Still on your publisher, right click your publication under
Replication->Local Publications, click View Snapshot Agent Status and click
Start to generate a new snapshot;
3. On your subscriber, add a new button named "Synchronize with
reinitialization" and add the following code for the button click event:
=============================================
private void btnSyncWithReInit_Click(object sender, EventArgs e)
{
// Define the server, publication, and database names.
string subscriberName = "155952M4";
string publisherName = "155952M2";
string distributorName = "155952M3";
string publicationName = "MyReplPub";
string subscriptionDbName = "MySub";
string publicationDbName = "MyPub";
string hostname = @"155952M4";
string webSyncUrl = "https://" + distributorName +
"/Mywebsync/replisapi.dll";

// Create a connection to the Subscriber.
ServerConnection conn = new ServerConnection(subscriberName);

MergePullSubscription subscription;

MergeSynchronizationAgent agent;

try
{
// Connect to the Subscriber.
conn.Connect();

// Define the pull subscription.
subscription = new MergePullSubscription();
subscription.ConnectionContext = conn;
subscription.DatabaseName = subscriptionDbName;
subscription.PublisherName = publisherName;
subscription.PublicationDBName = publicationDbName;
subscription.PublicationName = publicationName;

subscription.Reinitialize(false);

// If the pull subscription exists, then start the
synchronization.
if (subscription.LoadProperties())
{
// Get the agent for the subscription.
agent = subscription.SynchronizationAgent;

agent.PublisherSecurityMode = SecurityMode.Standard;
agent.PublisherLogin = "sa";
agent.PublisherPassword = "P@ssw0rd";
agent.DistributorSecurityMode = SecurityMode.Standard;
agent.DistributorLogin = "sa";
agent.DistributorPassword = " P@ssw0rd ";

agent.OutputVerboseLevel = 1;
agent.Output = "";

// Synchronously start the Merge Agent for the
subscription.
agent.Synchronize();
}
else
{
// Do something here if the pull subscription does not
exist.
throw new ApplicationException(String.Format("A
subscription to '{0}' does not exist on {1}", publicationName,
subscriberName));
}
}
catch (Exception ex)
{
// Implement appropriate error handling here.
throw new ApplicationException("The subscription could not
be synchronized. Verify that the subscription has been defined correctly.",
ex);
}
finally
{
conn.Disconnect();
}

}

==================================
4. Click this button after you add one or more articles.

If there is anything unclear, please let me know. Thank you!

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg DeleteThis @microsoft.com.
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Jeremy Sage

External


Since: Dec 22, 2008
Posts: 11



(Msg. 15) Posted: Wed Jan 14, 2009 8:59 am
Post subject: RE: Merge replication: The process could not read file ... due to [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

""Charles Wang [MSFT]"" wrote:

> Hi Jeremy,
> Yes, I tried adding a new stored procedure to the articles, however I did
> not reproduce your issue. Indeed with the existing code, I encountered an
> error regarding that the schema script of a default constraint could not be
> propagated to the subscriber. However the error is reasonable, since it is
> lack of reinitialization after an new article added. I added the
> "Reinitialize" function with the following code, and then it worked fine:
> subscription.Reinitialize(false);

Charles,

Apologies for the delay in replying but I have had to re-establish our test
setup and investigate the exact behaviour.

You are correct, reinitialising enables the new stored procedure article to
be synchronised to the client (I already had a reinitialise function in the
client application).

However, adding a table alone as a new article does not require
reinitialisation (as long as it is not in a filter) so I did not expect the
addition of a stored procedure to require reinitialisation either. Also, the
workaround referred to in the initial post of adding a dummy table as well as
a stored procedure does actually work without having to reinitialise. So it
does seem rather unnecessary having to reinitialise, and in a live
environment rather a burden.

The actual error itself of "OS error 53" I think might be related to the
agent process account; it is a local account on the subscriber but on the
publisher/distributor we have only set up a domain account with the same
name. Why we only get this error in this particular set of circumstances I
really don't know.

So although it is not the exact outcome I was hoping for I do feel in a
position to move forward on this.

Thanks very much for your help.
Jeremy
 >> Stay informed about: Merge replication: The process could not read file ... due.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
replication error "memory mapped file read failed" - Hi gurus, My replication has an error which I cannot solve for the whole day Environment: SQL Server 2K5 EE (CU8) + Window 2k3 (SP1) Replication type: Transactional replication There is one big table around 20million rows involved in the publication,...

Merge Replication Error when creating Merge Publication - Dear all, I am getting following error when creating Merge Publication on Database. This database is also has a push subscription from publisher. "You cannot create a merge publication in this database because it contains one or more anonymous ...

Merge Replication: Would changing the subscriber IP addres.. - Hi, I need to migrate 3 replicated databases to new servers running SQL2K on Windows 2003 standard, each server exist in different state with continues merge replication. Since the Databases around 40GB with big number of BLOBS I'm planning to follow...

Merge Replication nested view replication problem - I am using SQL 2005 as pub and SQL EXPRESS as sub with Merge replication. Got the following error message The schema script 'CD_InTransit_v_153.sch' could not be propagated to the subscriber. Error Detail: The schema script 'CD_InTransit_v_153.sch'..

Combining Transactional Replication and Merge Replication - I would like to know if this scenario is possible: I have main database (Server A) that I replicate to another server using transactional replication (Server B), know I would like to publish this database on Server B as a merge publication and then...
   Database Help (Home) -> Replication All times are: Pacific Time (US & Canada)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]