How to authenticate a user using SQL

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-04-01T07:01:43Z Indexed on 2010/04/06 9:33 UTC
Read the original article Hit count: 156

Filed under:

I have an DLL which is constantly connected to a SQL Server instance. The server itself is connected with "admin" permissions, but "normal" users should be able to access the server with their own username and password. The server would still be connected a "admin". I just want to check if the user can access the database.

Is there a way to authenticate the user using a SQL query?

It would of course be possible to add a encrypted "password" column to a database table for users, but I would prefer not having to do that.

© Stack Overflow or respective owner

Related posts about sql-server