Export (0) Print
Expand All
Expand Minimize

How to: Specify Article Types (Replication Transact-SQL Programming)

The default article types for replication are table articles, but you can publish other database objects as articles, including views, stored procedures, user-defined functions, and stored procedure execution. You can use replication stored procedures to specify an article type programmatically when you define an article. The procedures that you use depend on the type of replication and article type.

ms147873.note(en-US,SQL.90).gifNote:
The schema-only designation when defining table, view, and stored procedure articles indicates that only the object definition is replicated.

  1. At the Publisher on the publication database, execute sp_addarticle. Specify one of the following values for @type to define the type of article:

    This defines a new article for the publication. For more information, see How to: Define an Article (Replication Transact-SQL Programming).

  2. For logbased manualboth and logbased manualfilter articles, execute sp_articlefilter to generate the filtering stored procedure for a horizontally filtered article. For more information, see How to: Define and Modify a Static Row Filter (Replication Transact-SQL Programming).

  3. For logbased manualboth, logbased manualview, and logbased manualfilter articles, execute sp_articleview to generate the view that defines the vertically filtered article. For more information, see How to: Define and Modify a Column Filter (Replication Transact-SQL Programming).

  1. At the Publisher on the publication database, execute sp_addarticle. Specify one of the following values for @type to define the type of article:

    This defines a new article for the publication. For more information, see How to: Define an Article (Replication Transact-SQL Programming).

  2. For logbased manualboth and logbased manualfilter articles, execute sp_articlefilter to generate the filtering stored procedure for a horizontally filtered article. For more information, see How to: Define and Modify a Static Row Filter (Replication Transact-SQL Programming).

  3. For logbased manualboth, logbased manualview, and logbased manualfilter articles, execute sp_articleview to generate the view that defines the vertically filtered article. For more information, see How to: Define and Modify a Column Filter (Replication Transact-SQL Programming).

  1. At the Publisher on the publication database, execute sp_addarticle. Specify one of the following values for @type to define the type of article:

    This defines a new article for the publication. For more information, see How to: Define an Article (Replication Transact-SQL Programming).

  1. At the Publisher on the publication database, execute sp_addmergearticle. Specify one of the following values for @type to define the type of article:

    • table - a table article.
    • indexed view schema only - a schema-only indexed view article.
    • view schema only - a schema-only view article.

    This defines a new article for the publication. For more information, see How to: Define an Article (Replication Transact-SQL Programming).

  1. At the Publisher on the publication database, execute sp_addmergearticle. Specify one of the following values for @type to define the type of article:

    • func schema only - a schema-only user-defined function article.
    • proc schema only - a schema-only stored procedure article.

    This defines a new article for the publication. For more information, see How to: Define an Article (Replication Transact-SQL Programming).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft