April 13, 2008 at 6:04 am
Had an application upgrade this weekend and two new tables were added to a databases that we are replicating (transactional replication) to a differnt server.
before the upgrade, stopped the log reader for replication.
The application upgrade itself created the new tables.
I then added both of the new tables as articles to be replicated.
turned back on the log reader.
Tables existed in both the publisher and subscriber so I thought we were good. This morning I was alerted to the fact that some totals don't match so I checked the new tables on the subscriber and I neglected to add a primary key for replication.
added those in
ALTER TABLE [tower].[AgMisc] ADD
CONSTRAINT [PK_AgMisc] PRIMARY KEY CLUSTERED
(
[towid]
) WITH FILLFACTOR = 90 ON [PRIMARY]
GO
--
ALTER TABLE [tower].[bAgMisc] ADD
CONSTRAINT [PK_bAgMisc] PRIMARY KEY CLUSTERED
(
[towid]
) WITH FILLFACTOR = 90 ON [PRIMARY]
GO
and then waited for the replication Distribution agent to kick off on it's schedule. after it ran, It did not replicate the 8 records one of the tables. So not I have 8 records in the agmisc table on the publisher that are not in the subscriber table..
I'm by no means a replication expert.. can someone tell me what I might have done wrong?
April 14, 2008 at 8:46 am
I see another discrepency. for each table that is replicated, there are three stored procedures on the subscriber:
sp_MSins_MyTable
sp_MSupd_MyTable
sp_MSdel_MyTable
and these 3 stored procedures do not exist on the subscriber for these two new tables. Do I have to do some kind of initial push or something for these new tables?????
April 14, 2008 at 9:14 am
I guess the tables are small ( records <10000). If yes resnapshot the publication and you will be all set.
April 14, 2008 at 9:20 am
yes. they are small. When I kick off a snapshot I get this:
'a snapshot was not generated because no subscriptions needed initialization' ??
April 14, 2008 at 9:44 am
When I do:
sp_helpsubscription @publication = 'my publication'
I do not see my two new tables as articles
read somewhere I need to do this:
-- sp_addsubscription 'my publication' , 'my new article' , 'subscriber'
does anyone agree??? help?
April 15, 2008 at 6:59 am
in case anyone is interested.. figured it out last night:
sp_helpsubscription @publication = 'MY publication'
Did NOT see my new Article (new table(s)
sp_addsubscription @publication = 'MY publication' , @article = 'New article' , @subscriber = 'MY subscriber'
Added my new Article (new table(s)
sp_helpsubscription @publication = 'MY publication'
to make sure my new Articles show up
start Snaphot
Start REPL distribution Job
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply