How do I script Database-Level Permissions? #43
Replies: 2 comments 4 replies
-
I think you have to script the Database object and set ScriptingPreferences.IncludeScripts.Permissions to true |
Beta Was this translation helpful? Give feedback.
3 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
shueybubbles
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'll offer to add this to the sample docs on Microsoft Docs if I get an answer to this.
How do I use SMO to script out permissions like
GRANT CONNECT
orDENY CONNECT
that are database-level permissions?For example, in SSMS, I can do the following:
Below is my attempt to reproduce this logic using SMO:
Beta Was this translation helpful? Give feedback.
All reactions