June 19, 2012 at 9:42 am
I've created a new AD group and assigned members to it. How do I add this AD group to a db_datareader role of a database? I'm little concerned since this a new AD group.
June 19, 2012 at 9:50 am
the syntax is like this, is this what you were after?
EXEC sp_addrolemember N'db_datareader', N'MyDomain\NewADGroup'
Lowell
June 25, 2012 at 2:51 pm
Lowell (6/19/2012)
the syntax is like this, is this what you were after?
EXEC sp_addrolemember N'db_datareader', N'MyDomain\NewADGroup'
I'm getting this error:
Incorrect syntax near 'T001371\ViewSSN'
June 25, 2012 at 3:05 pm
well it's a syntax issue, i'd guess you are missing something compared to my working example. the leading N or a single quote, or something.
Can you post the EXACT command you ran?
Lowell
June 25, 2012 at 3:13 pm
Lowell (6/25/2012)
well it's a syntax issue, i'd guess you are missing something compared to my working example. the leading N or a single quote, or something.Can you post the EXACT command you ran?
Here's what I ran:
EXEC sp_addrolemember N'SSN_GRANTED', N '[T001371\ViewSSN]'
go
and I also tried
EXEC sp_addrolemember N'SSN_GRANTED', N 'T001371\ViewSSN'
go
June 25, 2012 at 3:17 pm
two minor syntax issues;
the first is missing the single quote after "SSN_GRANTED"
EXEC sp_addrolemember N'SSN_GRANTED', N '[T001371\ViewSSN]'
and for both commands, there cannot be a space between the N and the single quote to tell the susten that it is NTEXT:
EXEC sp_addrolemember N'SSN_GRANTED', N'T001371\ViewSSN'
Lowell
June 25, 2012 at 3:25 pm
Lowell (6/25/2012)
two minor syntax issues;the first is missing the single quote after "SSN_GRANTED"
EXEC sp_addrolemember N'SSN_GRANTED', N '[T001371\ViewSSN]'
and for both commands, there cannot be a space between the N and the single quote to tell the susten that it is NTEXT:
EXEC sp_addrolemember N'SSN_GRANTED', N'T001371\ViewSSN'
Aah..My bad..
It again gave me an error:
User or role 'T001371\ViewSSN' does not exist in this database.
June 26, 2012 at 1:25 am
Hello,
Frist create the login for domain group like this
CREATE LOGIN [DomainName\GroupName] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
Regards
Durai Nagarajan
June 26, 2012 at 3:45 pm
Be aware that up through 2008 R2 at least, Windows Group logins are not able to set a default schema.
https://connect.microsoft.com/feedback/viewfeedback.aspx?FeedbackID=238246&siteid=68
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy