question

ikramonly avatar image
ikramonly asked

Set Password on a database

I have created an app in C#, Sql server 2012. I Want to deploy a project On target machine and I want to set a password on only one database so that only those persons will have the direct access to the database in sql server who have the Password.How to perform this? any Help plz? Server is running in Windows Auth Mode
sql-server-2012sql server 2012sql-server-2012-express
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
CirqueDeSQLeil avatar image
CirqueDeSQLeil answered
You don't secure it in that way. Since the server is in Windows Auth mode, you grant the user accounts access to the database based on their windows accounts. An alternative method would be to create an application auth system in the database. Each user then checks against a table in the database to ensure it has access. That is a .net membership exercise and will require you to rework a fair amount of your application. The easier solution is to rely on database permissions.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.