SnowPro Core Certification — Question 514
When should a stored procedure be created with caller's rights?
Answer options
- A. When the caller needs to be prevented from viewing the source code of the stored procedure
- B. When the caller needs to run a statement that could not execute outside of the stored procedure
- C. When the stored procedure needs to run with the privileges of the role that called the stored procedure
- D. When the stored procedure needs to operate on objects that the caller does not have privileges on
Correct answer: C
Explanation
The correct answer is C because creating a stored procedure with caller's rights allows it to execute with the privileges of the role that called it, enabling access to resources that the caller may not directly have. Option A is incorrect as it relates to source code visibility rather than privileges, B is wrong because it addresses execution capability rather than rights, and D refers to object access which is not the focus of caller's rights.