I have a plsql job that runs as a specific user, and I need to perform a grant to give this user access to specific tables until the job completes. The job never takes more than 30 minutes.
My question is, in oracle is there anyway to grant a specific user access to a table for a limited amount of time, or should I just create another function to revoke privileges after the job is complete? I did a few quick searches and was unable to find anything on this. Does anyone know if this is possible?
It would be awesome if I could do grant all for 30 minutes.
There is a method in plsql called grantAccess(). It allows for you to give the number of seconds that a user is granted access for.
So, if you wanted to give them access for, say, a year, you would write the following: