Detailed Permissions Required for Replication Agent User on MSSQL2012
Our proposed Replication Landscape is as follows:
- Replication Server on Windows 2008 R2, Rep Server 15.7.1 SP207 (RSSD running on 15.7 SP134)
- Replication Agent on Windows 2008 R2, Replication Agent 15.7.1 SP208 (Primary DB is MS SQL 2012)
Replication Server + RSSD and Replication Agent have been installed on their hosts, and the next step is create the Replication Agent Instance. To do this, I have created a Resource File to automate all the inputs. This includes the details for the Primary Database user, SAPRepAgt.
When I run ra_admin -vr name_of_resource_file.rs, I get the following error:
ERROR: User ID <SAPRepAgt> for primary database does not have sufficient privileges -- invalid option: initialize_instance=no
The MS SQL 2012 database is managed by a separate team with a high-focus on security. They will allow the user to have db_owner role membership, but will not allow sysadmin Server Role to be granted to the user. We are trying to fine-tune the access via custom Role so that we can get the access we need without requiring sysadmin role. However, we are having difficulty finding and assigning permissions from the guides in MS SQL 2012.
Is there anyone who knows how to customize a Server Role in MS SQL 2012 so that Replication Agent can work, or is sysadmin the only way?
To create tables in the primary database.
To create DDL triggers in the primary database.
To create procedures in the primary database.
To create the "ReplicationAdmin" role. Only the user with the "ReplicationAdmin" role can mark a table or procedure.
To allow Replication Agent to execute sp_repltrans and sp_repldone in the primary database. This role is also required for primary database initialization.
To grant select permission on sys.sysschobs to the "ReplicationAdmin" role.
For Microsoft SQL Server data server initialization and deinitialization using pdb_xlog init and pdb_xlog remove, respectively.