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



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/prodtechnol/sql/2005/downloads/books.mspx


"UJ" <fred@xxxxxxxxxxx> wrote in message
news:uS9g7bbCHHA.468@xxxxxxxxxxxxxxxxxxxxxxx
Login failed for user stoelle

"Gail Erickson [MS]" <gaile@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23ptAjBaCHHA.4992@xxxxxxxxxxxxxxxxxxxxxxx
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/prodtechnol/sql/2005/downloads/books.mspx
"UJ" <fred@xxxxxxxxxxx> wrote in message
news:%23N7xadZCHHA.1012@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:OslCL5RCHHA.144@xxxxxxxxxxxxxxxxxxxxxxx
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/prodtechnol/sql/2005/downloads/books.mspx
"UJ" <fred@xxxxxxxxxxx> wrote in message
news:OsHzQQPCHHA.3380@xxxxxxxxxxxxxxxxxxxxxxx
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.












.



Relevant Pages

  • Re: SQL2005: Cannot connect error 11001
    ... The famous Windows Firewall (turned on my Server from which I'm trying to ... Exception Details: System.Data.SqlClient.SqlException: Login failed for user ... Try starting the SQL Server ... if you changed the port ...
    (microsoft.public.sqlserver.connect)
  • Re: error logging on SQL 2008
    ... I was, though, hoping for some more recognizable Reason for that error (state 11, " Token-based server access validation failed with an infrastructure error. ... Suggests that state 11 means "Valid login but server access failure", which doesn't really seem to rhyme with your description. ... How can you login to your SQL Server and use that tool if you can't log into your SQL Server? ... at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) ...
    (microsoft.public.sqlserver.server)
  • Re: SQL 2005 Express setup
    ... Connect to your SQL Server Instance, ... Double click on the Login that you want to add to the "sysadmin" server role or right click on it and choose properties from the popup menu, ... Login is a member of the "sysadmin" fixed server role now. ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL 2005 Express setup
    ... Connect to your SQL Server Instance, ... Double click on the Login that you want to add to the "sysadmin" server ... Mark the "sysadmin" checkbox to make this Login a member of this Server ...
    (microsoft.public.sqlserver.setup)
  • Re: Clearer version of my earlier question re sp_grantlogin and sp_grantdbaccess
    ... > file while you do changes, so the script file in the end contains the ... >> Server, doesn't have the right to grant DB access to Domain Groups. ... > Tibor Karaszi, SQL Server MVP ... >> site where they let me login as Domain Admin. ...
    (microsoft.public.sqlserver.msde)