Question

I have a merge replication in my SQL Server 2008.

I'm replicating some views, and I can't find an option to copy permissions for it, while tables, stored procedures and user-defined functions have this option.

I see only "Copy extended properties" option, but, as I know, this option is for view diagram.

I found "permissions on the view are not getting replicated", but this is a SQL Server 2012 issue.

Is there any possibility to copy it, cause I don't like workaround for issue above?

Was it helpful?

Solution

The Copy permissions article property is not exposed via the Article Properties dialog, you must add the article to the Merge publication using sp_addmergearticle and include @schema_option 0x40000000 which will copy permissions.

I've tested this in SQL Server 2008 and it works perfectly. However, I've tested this on SQL Server 2012 and there is a bug which prevents the permissions from being copied to subscribers. In that case, you would need to workaround the issue using a post snapshot script or post the GRANT statements to subscribers using sp_addscriptexec.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top