SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Replication


Replication

Author
Message
swetha.sql1
swetha.sql1
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 114
Hi Everyone,

Can some one help me. I have a question in Replication.

How do add articles to the existing replication without re-initializing. Please explain step by step as i'm new to SqlServer.


Regards,
Swetha.
dba.sql29
dba.sql29
Old Hand
Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)

Group: General Forum Members
Points: 385 Visits: 1222
Here are the steps to add article in publication without setting up whole replication again or running the whole snapshot again.

First Execute these two statements :-
To Get the publication Name:-

exec dbo.sp_helppublication


EXEC sp_changepublication
@publication = 'PublicationName',
@property = N'allow_anonymous',
@value = 'false'
GO

EXEC sp_changepublication
@publication = 'PublicationName',
@property = N'immediate_sync',
@value = 'false'
GO

Add table to publication :
exec dbo.sp_addarticle 'PublicationName' ,@article='TableNeedsToBeAdded',@@source_Object=' TableNeedsToBeAdded',@destination_table='TableNeedsToBeAdded',
@force_invalidate_snapshot=1
Go

Refresh the subscription : -
exec dbo.sp_refreshsubscriptions 'PublicationName'
go

Now run the snapshot agent which will only update the object changed/ added new object

exec msdb.dbo.sp_start_job @job_name='JobName'
go

How to find out the Snapshot agent job name:-

Select Name From MSDB.dbo.sysjobs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search