SqlDatabasePermission: Cannot grant or revoke permissions from database role #1498
Labels
bug
The issue is a bug.
good first issue
The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Details of the scenario you tried and the problem that is occurring
As I use SqlServerDsc primarily in ansible playbooks and the goal there is to punish manual changes I tried to ensure permissions for predefined server roles like db_datawriter
This failed as SQL server could not find a login named "db_datawriter". The main problem seems to be that SQLDatabasePermisssions does not check for roles but only for logins.
Verbose logs showing the problem
Suggested solution to the issue
Add Flag to DSc to either change role or user permissions
The DSC configuration that is used to reproduce the issue (as detailed as possible)
SQL Server edition and version the target node is running
SQL Server 2017
SQL Server PowerShell modules present on the target node
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used
The text was updated successfully, but these errors were encountered: