July 21, 2008 at 3:45 am
This weekend we had an application upgrade which changed one replicated table structure.
before the upgrade, I used the following to drop the article fom the
subscription:
Exec dbo.sp_dropsubscription @publication='My Publication', @article='My table' , @subscriber='My Subscriber'
Exec dbo.sp_droparticle @publication='My Publication', @article='My Table',
@force_invalidate_snapshot=1
Exec dbo.sp_refreshsubscriptions 'My Publication'
Then I stopped replication (turned off the log reader)
After the upgrade ....
I scripted out the new table in the publishing database and dropped and recreated it with the new table structure on the subscribing database. I then dropped the primary key on newly created table in the subscribing database, added the article back in to the publication using ENT Manager and turned back on replication.
The newly created table data will not replicate? Did I miss some steps????
July 21, 2008 at 5:28 am
Was there a new snapshot since the reactivation?
July 21, 2008 at 5:35 am
I did run a snapshot. the REPL distribution job runs every 15 minutes as well
July 22, 2008 at 8:47 am
Tried this:
Exec dbo.sp_dropsubscription @publication='TowerDB to KOCSQL03', @article='COD' , @subscriber='KOCSQL03'
Exec dbo.sp_droparticle @publication='TowerDB to KOCSQL03', @article='COD',
@force_invalidate_snapshot=1
Exec dbo.sp_refreshsubscriptions 'TowerDB to KOCSQL03'
--
Exec dbo.sp_addsubscription @publication='TowerDB to KOCSQL03', @article='Tower.COD' , @subscriber='KOCSQL03'
Exec dbo.sp_addarticle @publication='TowerDB to KOCSQL03', @article='tower.COD', @source_table= 'tower.cod' , @destination_table= 'tower.cod' ,
@force_invalidate_snapshot=1
Exec dbo.sp_refreshsubscriptions 'TowerDB to KOCSQL03'
Still not working.. don't know what I'm doing wrong???????????????
July 22, 2008 at 11:55 am
Perhaps a problem with the insert/update/delete stored procedures?
July 22, 2008 at 12:04 pm
I don't know what you mean by that.. which stored procedures?
I guess mean the ones that I see when I look at the propertieso f the article on the publisher:
CALL sp_MSins_tower.cod
CALL sp_MSDEL_tower.cod
CALL sp_MSupd_tower.cod
How would I know if there is a problem with these?
What if I just drop the table on the subscriber and do a snapshot ?? will it create the table on the subscriber??
July 23, 2008 at 1:29 pm
Worth a try, I'm out of clues.
July 23, 2008 at 1:52 pm
Dropped the table on the subscriber and after a snapshot.. it did not create the table..
I'm out of ideas ... must be someone out there who knows replication : )
July 28, 2008 at 1:52 am
ok, i tried this again...
table exists on the subscriber DB but with zero rows..
table exists on the publisher with the correct primary key for replication...
I tried this..
Exec dbo.sp_droparticle @publication='TowerDB to KOCSQL03', @article='tower.COD',
@force_invalidate_snapshot=1
Exec dbo.sp_refreshsubscriptions 'TowerDB to KOCSQL03'
then
Exec dbo.sp_addarticle @publication='TowerDB to KOCSQL03', @article='tower.COD', @source_table= 'tower.cod' , @destination_table= 'tower.cod' ,
@force_invalidate_snapshot=1
Exec dbo.sp_refreshsubscriptions 'TowerDB to KOCSQL03'
Then did a snapshot and REPL Distribution...
TABLE still not replicating??????
I tried the sp_reinitsubscription stored procedure but it has no effect so I suspect the initial snapshot is applied manually. (I did not originally build this replication)
when I do
sp_helpsubscription @publication = 'Towerdb to kocsql03'
I DO NOT see my new table.. what the heck am I doing wrong????????
July 28, 2008 at 10:06 am
I would drop the table at the subscriber. And see if it gets recreated.
ms page on dropping/adding articles:
http://msdn.microsoft.com/en-us/library/ms152493.aspx
Have to tried in another sequence?
Drop subscription
Drop article
Refresh
Add article
Add subscription?
Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply