views:

146

answers:

2

i'm logged with windows authentification and create an entry/user in the login table...

the new testuser has a sql-server authentification, but if a try to login local or remote, only fault 18456...

is there any trick... this should be so simple as explained... but should work?!

ideas?!

A: 

I don't quite understand your question - can you clarify a bit?

You're logged in with a Windows account - so does that Windows account (or a Windows group it belongs to) have a "login" in SQL Server?

How do you try to login with the new "testuser" ? How are you trying to connect? From an ADO.NET application? SQL Server Management studio?? Error 18456 can mean "login failed" - does your "testuser" have a SQL login? And is that login allowed to use the database you're trying to use??

Please give us a bit more information to go on - thanks!

Marc

marc_s
i try to login from SQL Server Management studio... there with windows authentication it works... from this account i create a new one by adding to the login table... this new testuser (with sql-server authentification) couldn't login to SQL Server Management studio... i have no idea why...
What if you create a second user based on a Windows login? Can that user log in? If so, see zappan's answer - then you probably don't have SQL server authentication turned on (it's off by default).
marc_s
+2  A: 

i believe it's just that the SQL server authentication is disabled by default installation. go check your SQL server properties in management studio (right-click on the server in object explorer, then select 'properties'), select 'security' menu in the left panel. you have the 'server authentication' option on the top of the right-side options panel with 2 options. make sure that the 'SQL server and windows authentication mode' is selected, not the 'windows authentication mode' which is default.

zappan
yes it was thx - how stupid - why it is enabled by default!
SQLServer authentication is disabled by default because the "preferred" way of authenticating to SQLServer is integrated security. If you need it you'll know soon enough and enable it. Most MS products are (now) secure by default.
WaldenL
If I could give more than +1 rep for this answer, you'd be the next Jon Skeet! Thank you! This has been bugging me for bloody days!
Phil.Wheeler
:) thanx phil :))))
zappan