Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Granting roles to user in Azure Synapse Dedicated Pool database #43

Open
owlleg6 opened this issue Jul 21, 2022 · 0 comments
Open

Granting roles to user in Azure Synapse Dedicated Pool database #43

owlleg6 opened this issue Jul 21, 2022 · 0 comments

Comments

@owlleg6
Copy link

owlleg6 commented Jul 21, 2022

Hello!

Currently, it is not possible to grant role to user in Synapse dedicated database. Because, 'ALTER ROLE' is not working in such
databases. Only

EXEC sp_addrolemember 'db_owner', 'User';

azure docs
image

Is there is any chance to provide some parameter in "mssql_user" resource, so when you are using Synapse dedicated pool database, it would be possible to switch to "EXEC" in part of Role assignment?

' SET @sql = ''ALTER ROLE '' + QuoteName(@role) + '' ADD MEMBER ' + QuoteName(@username) + ''';' +

Code snippet:
image

Error:
image

Cheers,
Oleh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant