Warning: Constant WP_TEMP_DIR already defined in /var/www/html/blogs/joe/wp-config.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/feed-rss2-comments.php on line 8
Comments on: When is the Publication Access List required? https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/ SQL Server Performance Tuning, High Availability and Disaster Recovery Blog Thu, 03 Jan 2013 04:36:33 +0000 hourly 1 https://wordpress.org/?v=6.9.4 By: Yagnesh https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-646 Fri, 27 Jan 2012 09:36:30 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-646 Thanks Joe,

Sorry for my mistake. I forgot that snapshot agent resides on distributor and hence it is required db_owner permission. Thanks for refreshing that. It is really great post on replication. We rarely find this type of stuff.

]]>
By: Joe Sack https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-645 Wed, 25 Jan 2012 15:01:45 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-645 Excellent! Thanks Brandon. If it matches my test with SQL Server 2012 RC0 – I think you’re right that we’ll see that merge follows the rules – and transactional does not.

]]>
By: Brandon Williams https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-644 Wed, 25 Jan 2012 14:58:28 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-644 Joe,

I’m testing with SQL Server 2008 R2 (10.50.2500).

Removing the Merge agent process account from the PAL prevents pull subscriptions from synchronizing for me. I have not tested with push subscriptions yet, but I’m guessing they will exhibit the same behavior, I’ll let you know shortly.

Either we’re missing something, or the Distribution agent isn’t giving us any respect. I’ll play with this some more and let you know what I find.

]]>
By: Joe Sack https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-643 Wed, 25 Jan 2012 14:50:44 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-643 Another update…

So I tested 11.0.1750 (SQL Server 2012 RCO), merge replication, pull subscription.

This time I saw PAL enforcement (unlike with transactional replication). The gateway for merge replication when the merge agent isn’t in the PAL is met when calling sp_helpdistpublisher. Calling it under the merge agent account returns “Msg 14080” when the agent account isn’t in the PAL. The message is generic (as expected since it is security related) – but it does say that the failure is at Line 138. Leading up to the error, the procedure checks a few conditions (for example – dbo on the distributor and checking sys.sp_MSrepl_DistDBPALAccess for PAL access).

So then that leads to the question of why this is enforced for merge and not transactional (even though it is documented as though it is fully enforced).

So I recreated the transactional replication pull scenario to see if the remote distributor is calling the same procedures in the same way.

Long story short is – executing sp_helpdistpublisher under the context of the distributor works just fine – even when the distributor account is not in the PAL (unlike in the merge replication scenario) – as the logic in the procedure is looking for db_owner in the distribution database. If I add that merge agent, the procedure runs under that agents context (even though it isn’t in the PAL). However merge replication is enforcing the PAL even further down the workflow. Where – I’m not sure – still working my way in and will likely trace it to find out where.

Either which way – it seems the intended functionality is represented in merge – but not in pull or push subscribers for transactional replication. Fun stuff!

]]>
By: Joe Sack https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-642 Wed, 25 Jan 2012 12:11:04 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-642 Hi Brandon,

Quick update, I was able to test on a different version – SQL Server 2012 RC0 (11.0.1750).

Both scenarios had the same PAL "bypass" I documented on today’s post for transactional replication.

11.0.1750 (SQL Server 2012 RCO), transactional replication, push subscription
11.0.1750 (SQL Server 2012 RCO), transactional replication, pull subscription

I’ll try merge replication next and share my findings. Hopefully this gap only applies to transactional replication.

]]>
By: Joe Sack https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-641 Wed, 25 Jan 2012 08:13:21 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-641 Thanks Yagnesh!

The snapshot agent should be added as a member of db_owner for the distribution database, yes. The full list of required permissions can be found on the Replication Agent Security Model topic (http://msdn.microsoft.com/en-us/library/ms151868(v=sql.105).aspx).

While the role and directory permissions seem solid – I still have some open questions on the PAL behavior. I’ll post findings here.

]]>
By: Yagnesh https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-640 Wed, 25 Jan 2012 07:59:39 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-640 Great post!!

Do we need db_owner role in distribution database for snapshot agent?

]]>
By: Joe Sack https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-639 Wed, 25 Jan 2012 07:47:37 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-639 Thanks Brandon! This is what I was hoping for (for folks to post variations of their PAL usage here, since there wasn’t much out there that reflected my walk through on version 10.50.2500 with transactional replication).

I’d like to repeat this specific test on a different version (push-subscriptions and transactional replication). I’ll report back here in the comments and also compare to merge replication.

Can you tell me what version you’re using (SP and any CUs specifically)? I can then compare to your exact edition. I won’t be surprised if you’re right that this was not intended, but then the next question is around which versions are impacted by this gap.

]]>
By: Brandon Williams https://www.sqlskills.com/blogs/joe/when-is-the-publication-access-list-required/#comment-638 Wed, 25 Jan 2012 07:37:52 +0000 /blogs/joe/post/When-is-the-Publication-Access-List-required.aspx#comment-638 Hi Joe,

I’ve found the PAL to work as expected with Merge Replication, e.g., preventing the Merge agent process account from synchronizing if it is not a member of the PAL. However, it doesn’t seem to be working correctly with Transactional Replication.

I honestly think you are facing a bug here. If the Distribution agent process account login is not a member of the PAL, the agent should not be able to synchronize.

]]>