how to specify domain SLASH user in Query Analyzer when creating users and granting permissions

how to specify domain SLASH user in Query Analyzer when creating users and granting permissions

Post by Timo » Sat, 31 Jan 2004 22:45:21


In Query Analyzer I am trying to execute SPs creating logons and
granting permissions but the DOMAIN\USER format is illegal because
of the SLASH character. How do youreference a specific
domain\user in QA?

I'm trying to set up logons and object permissions for SQLServer
2000 in a mixed Windows Authentication / SQL Server Authentication
environment, using Windows Authentication. Specifically, I'm
trying to grant the built-in SERVERNAME\ASPNET user access to
certain databases and then grant it some object permissions. IIS
and SQL2000 are running on the same machine.

I'm working in Query Analyzer because the Enterprise Manager
dialogs seem to get confused when we pick users from the list
after having specified the domain: EM keeps displaying an error
like "{myusername} already exists", but the error message does not
give the domain\ chunk of the username. Is EM ignoring the domain
prefix? Is this a known bug?

Thanks for the help.
Timo
 
 
 

how to specify domain SLASH user in Query Analyzer when creating users and granting permissions

Post by Russell Fi » Sun, 01 Feb 2004 01:54:46

Timo,

Logins can have the slash, but users cannot. Once you have added the login,
just:

sp_grantdbaccess 'DOMAIN\USER' -- let the username default

Russell Fields

 
 
 

how to specify domain SLASH user in Query Analyzer when creating users and granting permissions

Post by kevm » Sun, 01 Feb 2004 04:11:37

Try using [domain\username]

Thanks,

Kevin McDonnell
Microsoft Corporation

This posting is provided AS IS with no warranties, and confers no rights.