From this link, I noted that it is enough to grant application user 'execute' permission to the stored procedure.
But it will not work when the procedure is accessing the objects from different database.
We can think of two possible solutions, which involve creating a SQL login per database and assign minimum set of permissions, and
- Use execute as 'user' before actually accessing objects (could be stored procedures, tables, views or etc) in other databases. (i.e. RecordsUser before accessing Records database)
- Create a linked server for each database and refers to that in required procedures.
Is there any other solutions other better approaches than these?