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

Enabling the replication database in SQL Server

Oct 11 2011 7:05AM by Paresh Prajapati   

I would like to share a script to enable database for replication. So it is the step before adding publication and articles in replication.

USE master
GO

exec sp_replicationdboption @dbname = N'PublisherDB', @optname = N'publish', @value = N'true'
GO

exec [PublisherDB].sys.sp_addlogreader_agent @job_login = N'Domain\UserName', @job_password = null, @publisher_security_mode = 1
-- Or (for SQL User 'sa' or any system admin user)
exec [PublisherDB].sys.sp_addlogreader_agent @job_login = null, @job_password = null, @publisher_security_mode = 0, @publisher_login = N'sa', @publisher_password = N''
GO

exec [PublisherDB].sys.sp_addqreader_agent @job_login = null, @job_password = null, @frompublisher = 1
GO
Read More..  [0 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.

"Enabling the replication database in SQL Server" rated 5 out of 5 by 3 readers
Enabling the replication database in SQL Server , 5.0 out of 5 based on 3 ratings
    Copyright © Beyondrelational.com Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising