SnowPro Advanced: Data Engineer — Question 36
A Data Engineer has written a stored procedure that will run with caller's rights. The Engineer has granted ROLEA the right to use this stored procedure.
What is a characteristic of the stored procedure being called using ROLEA?
Answer options
- A. The stored procedure must run with caller's rights; it cannot be converted later to run with owner's rights.
- B. If the stored procedure accesses an object that ROLEA does not have access to, the stored procedure will fail.
- C. The stored procedure will run in the context (database and schema) where the owner created the stored procedure.
- D. ROLEA will not be able to see the source code for the stored procedure, even though the role has usage privileges on the stored procedure.
Correct answer: B
Explanation
The correct answer is B because if ROLEA does not have access to a required object, the stored procedure will fail to execute. Option A is incorrect as it doesn't address the access issue. Option C is not relevant since the caller's rights dictate the execution context, not the owner's. Option D is also incorrect because having usage privileges does not inherently prevent access to the source code.