QuestionQ45

VerifiedOfficial exam objectives/topics

The following stored procedure was created to load orders for one date into a target table:

Question Image

When the following statements are executed, this error is returned:

Question Image

Which changes will enable the procedure to run successfully?

Choose two
Explanation

An owner’s-rights Snowflake stored procedure cannot read a caller’s session variable such as $dateToProcess. A caller’s-rights procedure can access that session state, so EXECUTE AS CALLER resolves the restriction. Alternatively, supplying the date as an explicit procedure input parameter removes the direct dependency on a session variable and is supported for an owner’s-rights procedure.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!