Using SMO to create and set Database permissions?
-
08-07-2019 - |
Question
Is there a way to create new logins and set database permissions on a SQL Server 2005
using C#
and SMO
?
If so, how? If not, what is the best way of doing that?
Solution
You can use the Microsoft.SqlServer.Management.Smo.Login class and call the Create method. See here for more details.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow