简体   繁体   English

SQL Server复制数据文件夹安全权限

[英]SQL Server Replication Data Folder Security Permissions

I cannot get a snapshot to generate and the log reader to operate without granting full control of the repldata folder to the user group Everyone, which seems like the most insecure setting possible. 如果不将repldata文件夹的完全控制权授予用户组Everyone,就无法生成快照并无法运行日志读取器,这似乎是最不安全的设置。

I am creating a WPF application to set up SQL Server Replication using RMO and SMO . 我正在创建WPF应用程序以使用RMOSMO设置SQL Server复制。 My arrangement is Publisher and Distributor on one computer, Subscriber on another with Push Transactional Replication. 我的安排是在​​一台计算机上的发布者和发行者,另一台通过推式事务复制的订阅者。 I am using windows authenticated users as the snapshot and log_reader agents. 我正在使用Windows身份验证的用户作为快照和log_reader代理。 They are given db_owner of each replicated database, and db_owner and replmonitor on the distribution database. 为它们提供了每个复制数据库的db_owner,以及分发数据库上的db_owner和replmonitor。 They each have the sysadmin server role. 它们每个都具有sysadmin服务器角色。

If I grant the snapshot and log_reader windows users and the sqlserveragent user full control of the repldata folder, the replication still fails. 如果我授予了快照和log_reader Windows用户以及sqlserveragent用户对repldata文件夹的完全控制权,则复制仍然会失败。 The error is simple, OS Error 5: Access is Denied. 该错误很简单,操作系统错误5:访问被拒绝。

Is there a more restricted user group I can grant full control to, or am I forgetting a user to grant full control to? 我可以授予完全控制权的用户组是否受到限制,还是忘记了用户授予完全控制权的用户组?

I believe you are getting OS Error 5: Access is denied because you have not granted the Distribution Agent read permissions on the snapshot share. 我相信您正在获得操作系统错误5:访问被拒绝,因为您尚未授予分发代理对快照共享的读取权限。 You mentioned you granted permission to the Snapshot and Log Reader Agent, but not the Distribution Agent. 您提到您授予了快照和日志读取器代理的权限,但未授予分发代理的权限。

For a push subscription, the Distribution Agent must at minimum be a member of the db_owner fixed database role in the distribution and subscription database, be a member of the PAL, and have read permissions on the snapshot share. 对于推送订阅,分发代理必须至少是分发和订阅数据库中db_owner固定数据库角色的成员,是PAL的成员,并且对快照共享具有读取权限。 There are also other considerations which are covered in Permissions That Are Required by Agents in Replication Agent Security Model . Replication Agent安全模型中的代理 所需的权限中还包含其他注意事项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM