Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Restricting database user access

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2009-01-20 : 13:21:53
Guys,

I want to restrict a database user that I created to be accessing database/run scripts only from one machine. This user should not be able to access the database from any other machines. Is there any way to accomplish this? Also is there anyway to restrict the user to use only certain type of connections. For example I do not want the user to access the database from Management Studio.

Any suggestions and inputs would help.

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-20 : 14:12:57
You can't do this from within SQL Server. You'll need to do it at the network layer, perhaps through a firewall rule.

You can't restrict the user from using Management Studio.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2009-01-20 : 14:13:46
I don't think this can be done in SQL 2005. It might be possible in SQL 2008. Either way, have a look at Logon Triggers in BOL. Since a process can not kill itself, the best I can come up with is to have an unwanted connection log itself to a table. Set up a job that runs as often as possible (once per minute) to kill any process recorded in the table (and wipe the table, naturally). There are probably better systems out there, but this is the best that comes to mind after 5 minutes thought.
Go to Top of Page
   

- Advertisement -