Monday, March 26, 2012

OK - I'm stupid....How do you create a user?

OK - I'm stupid. How do you create a user? I've gone through the steps of
creating the user for the server, then create the user for the db but the
user cannot login.
Can somebody point me towards a web page/article that will tell me how to do
this?
TIA - Jeff.You might find the topics under this tutorial useful.
http://msdn2.microsoft.com/en-us/library/ms365345.aspx
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/pr...oads/books.mspx
"UJ" <fred@.nowhere.com> wrote in message
news:OsHzQQPCHHA.3380@.TK2MSFTNGP04.phx.gbl...
> OK - I'm stupid. How do you create a user? I've gone through the steps of
> creating the user for the server, then create the user for the db but the
> user cannot login.
> Can somebody point me towards a web page/article that will tell me how to
> do this?
> TIA - Jeff.
>|||OK. I'm doing something wrong. I execute the following statements:
use mktg
go
create login stoelle with password = 'sharon'
go
create user stoelle for login stoelle
go
grant select on referrals to stoelle
go
grant delete on referrals to stoelle
go
grant update on referrals to stoelle
go
grant insert on referrals to stoelle
go
The command completes successfully. I can see the user and the login. But I
can't login as the user. What else do I need to do?
TIA - Jeff.
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:OslCL5RCHHA.144@.TK2MSFTNGP02.phx.gbl...
> You might find the topics under this tutorial useful.
> http://msdn2.microsoft.com/en-us/library/ms365345.aspx
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://www.microsoft.com/technet/pr...oads/books.mspx
> "UJ" <fred@.nowhere.com> wrote in message
> news:OsHzQQPCHHA.3380@.TK2MSFTNGP04.phx.gbl...
>|||> The command completes successfully. I can see the user and the login. But
> I can't login as the user. What else do I need to do?
What error message do you get?
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/pr...oads/books.mspx
"UJ" <fred@.nowhere.com> wrote in message
news:%23N7xadZCHHA.1012@.TK2MSFTNGP04.phx.gbl...
> OK. I'm doing something wrong. I execute the following statements:
>
> use mktg
> go
> create login stoelle with password = 'sharon'
> go
> create user stoelle for login stoelle
> go
> grant select on referrals to stoelle
> go
> grant delete on referrals to stoelle
> go
> grant update on referrals to stoelle
> go
> grant insert on referrals to stoelle
> go
>
> The command completes successfully. I can see the user and the login. But
> I can't login as the user. What else do I need to do?
> TIA - Jeff.
>
> "Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
> news:OslCL5RCHHA.144@.TK2MSFTNGP02.phx.gbl...
>|||Login failed for user stoelle
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:%23ptAjBaCHHA.4992@.TK2MSFTNGP03.phx.gbl...
> What error message do you get?
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://www.microsoft.com/technet/pr...oads/books.mspx
> "UJ" <fred@.nowhere.com> wrote in message
> news:%23N7xadZCHHA.1012@.TK2MSFTNGP04.phx.gbl...
>|||> Login failed for user stoelle
You're almost there. Because the login you created is a local account and
not a Windows login, you'll need to change the authentication mode SQL
Server uses from "Windows Authentication" to "SQL Server and Windows
Authentication". This topic describes how to do this:
http://msdn2.microsoft.com/en-us/library/ms188670.aspx.
By default SQL Server uses Windows Authentication and it is considered a
best practice recommendation because it is more secure. In addition, you
should always use strong passwords for your logins. For more information
about authentication modes and strong passwords, see this topic:
http://msdn2.microsoft.com/en-us/library/ms144284.aspx.
I'm assuming you're learning/experimenting, which is great. When you're
ready to set up a production system with real users, you should use only
Windows authentication mode if at all possible.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/pr...oads/books.mspx
"UJ" <fred@.nowhere.com> wrote in message
news:uS9g7bbCHHA.468@.TK2MSFTNGP06.phx.gbl...
> Login failed for user stoelle
> "Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
> news:%23ptAjBaCHHA.4992@.TK2MSFTNGP03.phx.gbl...
>sql

No comments:

Post a Comment