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

SQL Server - Add Functions in publication for transactional replication using tsql script

Oct 10 2011 4:37AM by Paresh Prajapati   

Same as stored procedures & views adding in publication, we can add functions in publication for transactional replication with following script where you need to change type and add function name as a article.

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

exec sp_addarticle 
@publication = N'PublicationName', 
@article = N'FunctionName', 
@source_owner = N'SchemaName', 
@source_object = N'FunctionName',
@type = N'func schema only', 
@description = N'', 
@creation_script = N'', 
@pre_creation_cmd = N'drop', 
@schema_option = 0x0000000008000001, 
@destination_table = N'FunctionName',
@destination_owner = N'SchemaName', 
@status = 16
GO
</pre>

You can refer previous just learned tip here, http://beyondrelational.com/justlearned/posts/709/add-stored-procedures-in-publication-in-transactional-replication-using-script-sql-server.aspx

Read More..  [0 clicks]


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



Submit

Your Comment


Sign Up or Login to post a comment.

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