Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Setting article properties for a publication using RMO in C# .NET


Setting article properties for a publication using RMO in C# .NET

Author
Message
Pavan Kumar Renjal
Pavan Kumar Renjal
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 69
Hello everyone i am using transaction replication with push subscription. I am developing a UI for replication using RMO in C#.NET between different instances of the same database within same machine holding similar schema and structure. I am using Single subscriber and multiple publisher topology. During creation of publication i want to set a few article properties such as Keep the existing object unchanged and allow schema changes at subscriber to false and copy foriegn key constarint to true. How do i set the article properties using RMO in C# .NET. I am using Visual Studio 2008.I also want to know as how we can select all the objects including Tables,Views,Stored Procedures for publishing. I could do it for one table but i want to select all the tables at one stretch. This is the code snippet i used.

TransArticle ta = new TransArticle();
ta.Name = "Article_1";

ta.PublicationName = "TransReplication_DB2";
ta.DatabaseName = "DB2";

ta.SourceObjectName = "person";
ta.SourceObjectOwner = "dbo";

ta.ConnectionContext = conn;
ta.Create();
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