Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15785

[RESOLVED] Problem Adding User to Role

$
0
0
In SQL Server Express something (I forget which version, but something fairly recent, like 2017, if that's possible), I'm trying to write a script to add users and assign some roles to them. Adding the user is working, but then I attempt to assign a role using this:

ALTER ROLE db_datareader ADD MEMBER HISAppLogin

Which appears to be right according to a variety of sites, yet I'm getting an error on the ADD, with the error message saying that WITH is expected. The line is taken straight from the MS documentation, and is confirmed on a variety of other sites, so I'm not sure what I am doing wrong. I can see that WITH is an option, but it's an option for doing something that doesn't seem right. So...what am I doing wrong?

Viewing all articles
Browse latest Browse all 15785

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>