0

How I can restrict connection to my database (in Sql server 2012) according to Computer Name? Consider that I have a table that capture Computer name and want SQL to only accept connections from computer in our database and deny access to all computer Name that does not exist in our database.

  • Can you give a bit more info? Why are you wanting to handle it like that rather than use the security in SQL Server? – Keith Jul 11 '17 at 16:25
  • sql server doesn't expose computer name,it exposes hostname(program like ssms,application) or ipaddresses..you can try based on this – TheGameiswar Jul 11 '17 at 16:30
  • 1
    you can also check out on how to do this using firewall here :https://stackoverflow.com/questions/7127602/restrict-sql-server-connection-to-specific-ip-address – TheGameiswar Jul 11 '17 at 16:34
  • @TheGameiswar everyone can pass any hostname he wants in the connection string – sepupic Jul 11 '17 at 19:18
  • Hi, I have this desktop application that users on the domain are profile to use this application and in the user profile that affects the login table in the database we capture the user computer name. I was ask to do a sql trigger to deny all users computer that are accessing this application. This is because I found some bug in the application and have created a new application that resolve those bugs and want all user to use this new application instead of the old one. – Augustine Dagoseh Jul 12 '17 at 10:26

0 Answers0