Search code examples
rrodbc

Limit User Abilities During RODBC Connection


We have a database that we are connecting to via RODBC, the accounts have been given read only access on the database side, however if we log in via R we are able to read/write/execute. I have been using the read only command within the connection command as follows:

odbcConnect(dsn = "DSN",uid="un",pwd="pass",readOnly=T)

I've noticed that, while users cannot write to tables or write to new tables, they can create new tables. I would like to ensure that users are unable to modify the database to open this to a broader user group. Has anyone found a sure fire way to limit user access from the R side?


Solution

  • Per comments made by Gregor, the issue is not R side it is database side. The system that was being dealt with was performing security checks on a front end application rather than at the ODBC handshake. As such, R had no way of enforcing rules that were not enforced server side.