TransArticle Object (SQL-DMO)
The TransArticle object represents a table or a stored procedure that is published using a transactional or a snapshot publication.
Remarks
With the TransArticle object, you can:
- Add a table or stored procedure article to a transactional publication.
- Change the properties of an existing table or stored procedure article of a transactional publication.
- Add a table or stored procedure article to a snapshot publication.
- Change the properties of an existing table or stored procedure article of a snapshot publication.
To add a table article to a transactional publication
- Create a new TransArticle object.
- Set the Name property to the name of the new article.
- Set the SourceObjectName property to the name of a table.
- Set the SourceObjectOwner property to the owner of the table.
- Add the TransArticle object to the TransArticles collection of a connected TransPublication object containing a transactional publication.
To add a stored procedure article to a transactional publication
- Create a new TransArticle object.
- Set the Name property to the name of the new article.
- Set the SourceObjectName property to the name of a stored procedure.
- Set the SourceObjectOwner property to the owner of the stored procedure.
- Set the ArticleType property to SQLDMORep_ProcExecution or SQLDMORep_SerializableProcExecution.
- Add the TransArticle object to the TransArticles collection of a connected TransPublication object containing a transactional publication.
To alter an existing table article of an existing transactional publication
- Get a TransArticle object containing a table article from the TransArticles collection of a connected TransPublication object.
- Use the BeginAlter method to mark the beginning of the changes.
- Set the TransArticle object properties to reflect the changes to the table article.
- Use the DoAlter method to submit the changes to Microsoft® SQL Server™.
To alter an existing stored procedure article of an existing transactional publication
- Get a TransArticle object containing a stored procedure article from the TransArticles collection of a connected TransPublication object.
- Use the BeginAlter method to mark the beginning of the changes.
- Set the TransArticle object properties to reflect the changes to the stored procedure article.
- Use the DoAlter method to submit the changes to SQL Server.
To add a table article to a snapshot publication
- Create a new TransArticle object.
- Set the Name property to the name of the new article.
- Set the SourceObjectName property to the name of a table.
- Set the SourceObjectOwner property to the owner of the table.
- Add the TransArticle object to the TransArticles collection of a connected TransPublication object containing a snapshot publication.
To add a stored procedure article to a snapshot publication
- Create a new TransArticle object.
- Set the Name property to the name of the new article.
- Set the SourceObjectName property to the name of a stored procedure.
- Set the SourceObjectOwner property to the owner of the stored procedure.
- Set the ArticleType property to SQLDMORep_ProcExecution or SQLDMORep_SerializableProcExecution.
- Add the TransArticle object to the TransArticles collection of a connected TransPublication object containing a snapshot publication.
To alter an existing table article of an existing snapshot publication
- Get a TransArticle object containing a table article from the TransArticles collection of a connected TransPublication object containing a snapshot publication.
- Use the BeginAlter method to mark the beginning of the changes.
- Set the TransArticle object properties to reflect the changes to the table article.
- Use the DoAlter method to submit the changes to SQL Server.
To alter an existing stored procedure article of an existing snapshot publication
- Get a TransArticle object containing a stored procedure article from the TransArticles collection of a connected TransPublication object containing a snapshot publication.
- Use the BeginAlter method to mark the beginning of the changes.
- Set the TransArticle object properties to reflect the changes to the stored procedure article.
- Use the DoAlter method to submit the changes to SQL Server.
Methods
Properties
(c) 1988-98 Microsoft Corporation. All Rights Reserved.