Wednesday, May 1, 2019

Database grants

Depending on how you query your tables or views, and with which database user you are doing that querying with, it is possibly that a table alter or a rebuild of the view will strip the object of your Select (and possibly other) permission(s).

An easy way to resolve this is to have a SQLExec() function run which reapplies the missing grants. This also assumes that:
a) It is easier to do this than to contact your DBA team, and
b) You have an easy way to run the SQLExec(), e.g. using an IScript.
c) This is in Development only :)
SQLExec("GRANT SELECT ON MY_OBJECT TO MY_USER_OR_ROLE");

1 comment:

  1. Why not just create a page with a textarea and let the user write any SQL they want into that? /s

    Some things best left to the DBAs


    ReplyDelete