Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Replication Expand / Collapse
Author
Message
Posted Friday, January 10, 2014 7:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 3:36 PM
Points: 2, Visits: 32
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.
Post #1529784
Posted Wednesday, February 19, 2014 9:26 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, November 20, 2014 5:39 PM
Points: 53, Visits: 850
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
Post #1543101
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse