Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Transactionnal replication using stored procedudes on suscriber

0 views
Skip to first unread message

Florian Doyon

unread,
Aug 25, 2003, 4:28:16 AM8/25/03
to
Hello,

I have unsuccessfully been trying to initiate a transactional
replication on the subscriber using only stored procedures.

Here are the steps I am following:

1 - Register for subscription
sp_addpullsubscription
sp_addpullsubscription_agent
-- @distribution_jobid gives the agent job ID for the subscription

2 - call the job created by the agent for the replication
sp_job_start @distribution_jobid

sp_help_job_history -- to check the completion of the job
-> job_status = 1 , so it looks like everything went fine

The registering process is working, as I can see the subscription and
synchronize my database using Server Manager.

However, the replication itself doesn't work when using sp_job_start, I
don't see any changes on the subscriber database, but I now have 3
tables my original database did not have:
- MSsubscriptions_properties
- MSsubscriptions_agents
- MSsubscriptions_subscriptions

Does anyone have any ideas?

What I am trying to do is simply subscribe to a replication and
programmatically call it on the subscriber [I'm using C#/ado.net]. If
you know of any other way [using an activeX or system calls], please
advise me.

Thanks a lot for your help
Florian.

Deepak kumar [MSFT]

unread,
Aug 25, 2003, 9:34:01 PM8/25/03
to
Try running the distrib.exe from the command line at your subscriber machine
for you pull subscription. You can get the command by looking into the job
steps system table or here is an you can use: In the example repalce all
your parameters with your setup, if you are using standard security then use
0 (in this case provide the right used id and pwd), if integrated (windows)
than 1 (no need of user id & pwd). Standard -OutputVerboseLevel is 1, you
can use 2 to see more detail.

<drive_name>:\Program Files\Microsoft SQL
erver\90\COM\DISTRIB.EXE -Subscriber <subscriber_name> -Publisher
<publisher_name> -Distributor <distributor_machine_name> -SubscriberDB
<subscriber db> -DistributorSecurityMode <0/1> -DistributorLogin
<login_name> -DistributorPassword <distributor pwd> -SubscriberSecurityMode
<0/1> -SubscriberLogin <subscriber login> -SubscriberPassword <subscriber
password> -SubscriptionType 2 -Publication <publication
name> -OutputVerboseLevel 2

You can also look at the MSdistribution_history table for any error message
or use replication monitor from Enterprise manager (EM).

If you see error then make sure that your replication is setup properly. You
can set it up using the replication setup wizard in EM and choosing pull
option. You can also script all the steps from UI after you have setup the
replication to see all the SP calls.

HTH - Deepak
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Florian Doyon" <xemac...@altern.org> wrote in message
news:u20b9Kua...@tk2msftngp13.phx.gbl...

0 new messages