Groups | Blog | Home
all groups > sql server replication > july 2005 >

sql server replication : SQLDistribution ActiveX does not reinitializes subscription



SammyBar
7/29/2005 9:49:17 AM
Hi all,

I'm using SQL Server ActiveX replication controls for synchronizing
programatically a snapshot type publication to an anonymous subscriber. The
subscriber is on a laptop and the idea is when this si connected to the
network, and the user wish, it can hit a button on a simple Visual Basic 6
application that makes the synchronization. The code is very simple when
deleting the initialization of the control:

Set mobjDistr = New SQLDistribution
mobjDistr.Initialize
mobjDistr.Run
mobjDistr.Terminate

It have been working as expected. The problem raises when we need to make a
change to the published tables. We need to delete the publication, make the
changes and recreate it. As a result when the above code is called the
following error is raised:
"The subscription has not been synchronized within the maximum retention
period or it has been dropped at the Publisher. You must reinitialize the
subscription to receive data."
To solve this problem we use the Enterprise Manager for reinitializing the
subscription. But it requires some expertise to use the Enterprise Manager
and the user is often travelling. We need to solve this with our easy-to-use
one buttom interface. I tried the following:

mobjDistr.ReinitializeSubscription
mobjDistr.Run
mobjDistr.Terminate

I expected it to act like the Enterprise Manager but it also raises the same
error just when calling ReinitializeSubscription.

What I'm doing wrong?
Thanks in advance
Sammy

Hilary Cotter
7/29/2005 4:29:01 PM
you need to run SQLInitX to regenerate the snapshot. Then run the
distribution control to distribute it.

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]

SammyBar
7/29/2005 6:16:16 PM
[quoted text, click to view]
We regenerate the snapshot by hand from the EnterpriseManager, there is no
problem with this. The snapshot is always ready for the user when he
connects to the database from a remote location. We just want to avoid the
user face the error "You must reinitialize the subscription". Doing this
with the distribution control doesn't work. It returns the same error.

A similar error was posted before but no answers yet...
http://groups-beta.google.com/group/microsoft.public.sqlserver.replication/browse_thread/thread/5ffa12d59ec4bdff/d79e7668c79c0cf8?lnk=st&q=SQLDistribution+ReinitializeSubscription&rnum=1&hl=en#d79e7668c79c0cf8

Hilary Cotter
7/30/2005 6:29:18 AM
you can get this error if the subscriber does not have rights to access the
publisher and distributor.

The distributor account must be in the dbo role in the distribution
database, and in publisher account the PAL in the publication database.

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]

AddThis Social Bookmark Button