all groups > sql server replication > april 2005 >
You're in the

sql server replication

group:

Transactional Replication Advice


Re: Transactional Replication Advice Hilary Cotter
4/20/2005 10:23:14 AM
sql server replication:
use a seperate publication. You can also use sp_addarticle and
sp_refreshsubscriptions. This will only generate a snapshot for the new
article and related metadata if both your publisher and subscriber are
running SQL 2k.

--
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]

Transactional Replication Advice Simon
4/20/2005 3:03:04 PM
I am in the early stages of setting up replication and I was wondering if
someone could offer a little advice.

I have an updateable database of around 200,000 records, each described (in
great detail) across a few hundred tables. There are also associated tables
such as decode tables. The data changes by about 1% a day.

I want this data for manipulation and publishing on a web site, not
updateable, available 24x7 - not 100% availability but just minimising data
unavailability whilst data is refreshed.

I have set up transactional replication. I have then set up a pull
subscription from the subscriber. When I first set it to reinitialise and
then run the snapshot and distribution agent the tables are created
successfully. Every day (or every 10 minutes in my test environment)
transactions are pulled down and applied to the replicated set.

I then tested by adding a new table (article) to the publication. It seemed
that the only way to get the intial schema and data down was to
resynchronise the snapshot. Unfortunately this meant the whole replicated
set was re-created. Is there a way to propagate a new (or structurally
different) article to the subscriber?

Cheers!
Simon

Re: Transactional Replication Advice Paul Ibison
4/20/2005 3:23:10 PM
Simon,
for a new table, the script to run is something like this (modified for your
schema):
exec sp_addarticle @publication = 'tTestFNames'
, @article = 'tEmployees'
, @source_table = 'tEmployees'

exec sp_addsubscription @publication = 'tTestFNames'
, @article = 'tEmployees'
, @subscriber = 'RSCOMPUTER'
, @destination_db = 'testrep'

Once this is run, starting the snapshot agent will create a snapshot of just
the new article, and the distribution agent will then pick it up and apply
it on the subscriber.

Paul Ibison SQL Server MVP,
www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

AddThis Social Bookmark Button