Mar72Vin


Hi All,
I am replicating an SQL2005 express machine to SQL2005 standard edition server using merge replication.

I have a simple VB application using ADO polling msMerge_history at the subscriber every second so that i can show the end user the progress of the replication.

When the subscription first subscribes and after the initial snapshot is applied replication downloads all changes from the server that have been changed since the snapshot was created.

Towards the end of this download faze the VB polling application fails with "Cannot open database "DBName" requested by the login. The login failed."

This connection fails 4 or 5 times and then normal polling resumes. The scary thing is that sometimes when the polling connection fails the merge replication does not complete and if i check msMerge_Sessions the "runstatus" is stuck at 3 (InProgress).

1) Is the reason the ADO polling connection fails because of some sort of lock between replication and reading the system tables
2) Is replication getting stuck because of locks
3) What can i do to get around this

cheers,
Tim




Re: Cannot open database during merge replication

L Zhou


Hello Tim,

Please try to use uncommited read isolation level (or SELECT ... WITH (NOLOCK) )when querying msMerge_Sessions table.

But result row set from this query contains uncommitted transactions.

This posting is provided AS IS with no warranties, and confers no rights