Materializes and validates all replicate articles in a specified subscription, or a specified replicate article in a specified subscription.
sp_materializesub sub_name [, rep_art]
is the name of the subscription containing replicate articles to materialize and validate.
is the name of a replicate article to materialize and validate. Replicate article names can be specified in the form owner.name.
sp_materializesub subdoc, repdoc
Materializes and validates the replicate article repdoc in the subscription subdoc.
Before you invoke sp_materializesub, you must suspend the subscription using sp_suspendsub. After the replicate article (or articles) is materialized and validated, you can resume the subscription using sp_resumesub.
When a replicate article for a table is materialized, data in the primary object identified by the primary article to which the replicate article subscribes is copied to the replicate table using an insert into ... select from command, based on the subscribed fields and the where clause specified in the replicate article (if applicable).
When a replicate article is validated, the Publisher component places a marker in the Adaptive Server transaction log, indicating the point at which transaction distribution for that replicate article should begin. Any transactions to which the replicate article subscribes that occur prior to the marker location in the transaction log are not distributed to the replicate object identified by the replicate article.
If you invoke sp_materializesub to materialize a replicate article for a stored procedure, the subscription for that article is validated only, and not materialized. Replicate articles for stored procedures need not be materialized.
When you invoke sp_materializesub and specify only a subscription (sub_name), all replicate articles in the specified subscription are materialized (tables only) and validated (both tables and stored procedures).
When you invoke sp_materializesub and specify a subscription (sub_name) and a replicate article (rep_art), the specified replicate article in the specified subscription is materialized (table only) and validated (either table or stored procedure).
As an alternative to sp_materializesub, you can validate a replicate article for a stored procedure using sp_validatesub.
When the requested action occurs successfully, no results are returned.
When an error occurs, an error message is returned.