April 22, 2013 at 5:41 am
Hi
A few users who has access to a database via a windows group which has modify rights, now also need to be able to access the database via SSMS but then only with read only rights. I therefor need to differentiate the rights on basis of the app they access the database with. Since the app has been running for a while and is not that easy to change, I have to come up with a way to prevent them from doing updates while working in SSMS.
Is there a way to do this? I am currently looking into whether it would be possible to use a SSMS application role in combination with a login trigger which executes sp_setapprole when the user logs in with SSMS.
Are there other ways to do this?
And if not, am I on the right track? I have very little experience in working and managing application roles and have no idea whether my idea would work.
Thanks in advance
April 23, 2013 at 4:43 am
I would suggest you set the user's permissions based upon the access they require when connecting via SSMS.
When they connect via some other application you can have that application connect using an application specific account and set the SQL permissions for that account accordingly or alternatively if the application calls stored procs you could have those stored procs run as a more privileged account and grant the user EXECUTE rights to the specific stored proc.
The former will be easier to implement but if you need to track who the actual users are that funcionality would need to be built in to the application. The latter if properly implemented should be more secure.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply