Sql-server – How to get article properties from query in a merge replication

merge-replicationreplicationsql server

I would like to know if there are any queries to get article properties in a SQL Server merge replication. I'm able to get properties only by GUI. I select a publication properties then I get the page properties, then I select an article (a table) then if I want to check the Article Properties, I select Set Properties of Highlighted Table Article I get the four group of properties like as Copy Objects and Settings to Subscriber, Destination Object, Identification and Merging Changes.
Anybody knows if there are any queries to get that properties or to get a script that create the article with of all of these properties?

Best Answer

This is covered in View and Modify Article Properties, in the section To view the properties of an article belonging to a merge publication:

Execute sp_helpmergearticle, specifying the name of the publication for the @publication parameter and the name of the article for the @article parameter. If you do not specify these parameters, information will be returned for all articles in a publication or at the publisher.

If you want to generate scripts to create replication components, this is covered in Scripting Replication.