Home > Archive > MS SQL Server security > September 2005 > Adding Win 2000 account to SQL Server database role









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Adding Win 2000 account to SQL Server database role
Nam

2005-09-21, 11:23 am

According to SQL Server 2000 Books online:

"When you add a Windows NT 4.0 or Windows 2000 login without a user account
in the database to a SQL Server database role, SQL Server creates a user
account in the database automatically, even if that Windows NT 4.0 or Windows
2000 login cannot otherwise access the database".

My Questions: How can you add a login to a role without a user account (with
that login) in the database? So, I don't understand the above comments. I was
unable to create the above example since I had to create a win 2000 login as
a user in the database first before adding that login to a role. Can someone
please explain the above comments?

Thanks,
Kev
Sue Hoegemeier

2005-09-22, 3:23 am

Maybe you were trying it just through Enterprise Manager?
You need to use the system stored procedure to do this. Try
the following:
Create a new user on the machine.
In Query Analyzer, execute the following:
use northwind
go
sp_addrolemember 'db_datareader', 'YourMachine\YourUse
r'

The windows account will show up a user in the database with
access via group membership. You don't have to first add the
login or add the user to the database.

-Sue

On Wed, 21 Sep 2005 08:06:04 -0700, Nam
<Nam@discussions.microsoft.com> wrote:

>According to SQL Server 2000 Books online:
>
>"When you add a Windows NT 4.0 or Windows 2000 login without a user account
>in the database to a SQL Server database role, SQL Server creates a user
>account in the database automatically, even if that Windows NT 4.0 or Windows
>2000 login cannot otherwise access the database".
>
>My Questions: How can you add a login to a role without a user account (with
>that login) in the database? So, I don't understand the above comments. I was
>unable to create the above example since I had to create a win 2000 login as
>a user in the database first before adding that login to a role. Can someone
>please explain the above comments?
>
>Thanks,
>Kev


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com