|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQLDistribution ActiveX does not reinitializes subscriptionI'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 you need to run SQLInitX to regenerate the snapshot. Then run the
distribution control to distribute it. -- Show quoteHilary 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 "SammyBar" <sammy***@gmail.com> wrote in message easy-to-usenews:%23HlsexElFHA.3260@TK2MSFTNGP10.phx.gbl... > 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 Show quote > 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 > > > you need to run SQLInitX to regenerate the snapshot. Then run the We regenerate the snapshot by hand from the EnterpriseManager, there is no > distribution control to distribute it. 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 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 "SammyBar" <sammy***@gmail.com> wrote in message http://groups-beta.google.com/group/microsoft.public.sqlserver.replication/browse_thread/thread/5ffa12d59ec4bdff/d79e7668c79c0cf8?lnk=st&q=SQLDistribution+ReinitializeSubscription&rnum=1&hl=en#d79e7668c79c0cf8news:eEPSwMJlFHA.3656@TK2MSFTNGP09.phx.gbl... > > you need to run SQLInitX to regenerate the snapshot. Then run the > > distribution control to distribute it. > 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... > Show quote > > |
|||||||||||||||||||||||