Getting Started with Web applications development with servlets and JSP - Part 5: Filters
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.


Upload Image Close it
Select File

Learned something today? Share it, or learn from what others have learned today

Add Stored Procedures in publication for transactional replication using script - SQL Server

Oct 5 2011 5:05AM by Paresh Prajapati   

Following is the script to add stored procedures in publication using tsql script for transactional replication. It is just same as adding views in publication. You just need to change relevant objects and type in script.

<pre class="brush: plain">
USE PublisherDB
GO

EXEC sp_addarticle 
@publication = N'PublicationName', 
@article = N'ProcedureName', 
@source_owner = N'SchemaName',

@sourceobject = N'ProcedureName', @type = N'proc schema only', @description = N'', @creationscript = N'', @precreationcmd = N'drop', @schemaoption = 0x0000000008000001, @destinationtable = N'ProcedureName', @destination_owner = N'SchemaName', @status = 16 GO

You can refer earlier post to add views in replication here, http://beyondrelational.com/justlearned/posts/701/.aspx

Read More..  [7 clicks]


Paresh Prajapati
7 · 24% · 5511
3
 
1
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten
 
0
Move



Submit

Your Comment


Sign Up or Login to post a comment.

"Add Stored Procedures in publication for transactional replication using script - SQL Server" rated 5 out of 5 by 3 readers
Add Stored Procedures in publication for transactional replication using script - SQL Server , 5.0 out of 5 based on 3 ratings
    Copyright © Beyondrelational.com Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising