Is it possible to GRANT CREATE DATABASE TO a domain user account or group?
I have both SQL Express 2005 & SQL 2005 Developer edition machines, both
have windows integrated security enabled.
I am trying to do something like:
GRANT CREATE DATABASE TO 'DomainName\DomainUserName'
I get an error that complains about the '\' being incorrect syntax.
However, if I do a
sp_addsrvrolemember 'DomainName\DomainUserName', 'dbcreator'
that works like a champ.
I have also tried this same test on a machine that is not part of the domain
(changing domain name to machine name of course).
Is this supported? How can I do it? Can I specify a domain group in it
instead?
Thanks for any information,
JoeTry:
GRANT CREATE DATABASE TO [DomainName\DomainUserName]
(Use square brackets instead of quotes.
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Joe" <jwdaigle@.nospam.nospam> wrote in message
news:%236qm7LPpGHA.4116@.TK2MSFTNGP03.phx.gbl...
> Is it possible to GRANT CREATE DATABASE TO a domain user account or group?
> I have both SQL Express 2005 & SQL 2005 Developer edition machines, both
> have windows integrated security enabled.
> I am trying to do something like:
> GRANT CREATE DATABASE TO 'DomainName\DomainUserName'
> I get an error that complains about the '' being incorrect syntax.
> However, if I do a
> sp_addsrvrolemember 'DomainName\DomainUserName', 'dbcreator'
> that works like a champ.
>
> I have also tried this same test on a machine that is not part of the
> domain (changing domain name to machine name of course).
>
> Is this supported? How can I do it? Can I specify a domain group in it
> instead?
>
> Thanks for any information,
> Joe
>|||Hi Joe,
I agree with Arnie that you can use the square brackets to wrapper your
domain username and square brackets is mostly used to wrapper database
object names which contains particular characters. In addition, as for
GRANT/REVOKE statements, they can work on both domain users and domain
groups.
Regards,
Steven Cheng
Microsoft MSDN Online Support Lead
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hello Joe,
Does the suggestion in the previous messages help you on this issue? If
there is still anything we can help, please feel free to post here.
Regards,
Steven Cheng
Microsoft MSDN Online Support Lead
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment