Set permisson user allow connect with application, don't allow connect with ssms

  • Hello, guys.

    I use .net to code, can i set permisson a sql user only can connect in connection string in .net code, and not allow that user login with ssms ?

  • If a user knows the right login and the right location to use, they can connect with any tool at all.

    There's no easy way to deal with what you're asking for. You could try using Logon Triggers to capture the app and prevent the user from connecting. You could set up the XESmartTarget and use that to capture the logons and then respond with a disconnect or some message or something. Neither is going to be simple.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey wrote:

    If a user knows the right login and the right location to use, they can connect with any tool at all.

    yeah, that why i need for help. With simple user, not need to be worry. But with some user have knowledge, it seem to be serious problem about security database.

    • This reply was modified 4 years, 2 months ago by  mrsiro.
    • This reply was modified 4 years, 2 months ago by  mrsiro.
  • Is there a specific reason you want to have individual users accessing the database? If you are developing a .NET application would it be better to have one application login that had the appropriate permissions on tables and/or stored procedures and a "users" table that controls access to the application?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply