ExamGecko
Question list
Search
Search

Question 437 - SnowPro Core discussion

Report
Export

When should a stored procedure be created with caller's rights?

A.

When the caller needs to be prevented from viewing the source code of the stored procedure

Answers
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

Answers
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

Answers
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

Answers
D.

When the stored procedure needs to operate on objects that the caller does not have privileges on

Suggested answer: C

Explanation:

Stored procedures in Snowflake can be created with either 'owner's rights' or 'caller's rights'. A stored procedure created with caller's rights executes with the privileges of the role that calls the procedure, not the privileges of the role that owns the procedure. This is particularly useful in scenarios where the procedure needs to perform operations that depend on the caller's access permissions, ensuring that the procedure can only access objects that the caller is authorized to access.

asked 29/10/2024
Thanh Phan
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first