Valid NAS-C01 Dumps shared by EduDump.com for Helping Passing NAS-C01 Exam! EduDump.com now offer the newest NAS-C01 exam dumps, the EduDump.com NAS-C01 exam questions have been updated and answers have been corrected get the newest EduDump.com NAS-C01 dumps with Test Engine here:
A Snowflake Native App includes a managed task 'app_db.app_schema.daily_data_processing'. You, as the application provider, need to ensure that consumer accounts can only execute this managed task and have no other privileges. You also need to implement robust error handling to log any failed execution attempts within the consumer account. Which of the following SQL statements, when executed within the application's installation script, provides the most secure and complete solution to achieve these requirements, including error logging within the consumer account (assuming an existing table exists)?
Correct Answer: C
Option C is the most comprehensive. It grants the necessary USAGE privileges on the database and schema, which are prerequisites for the consumer account's application role to access the managed task. It also includes robust error handling using a BEGIN...EXCEPTION block, logging any errors encountered during the privilege granting process to the 'execution_log' table. Options A and D are missing the necessary USAGE privileges, which would prevent the task from executing. Option B lacks USAGE grants and only handles errors within the GRANT execution itself, not potential issues with missing database/schema access for the role. Option E includes 'WITH GRANT OPTION' , which is unnecessary and potentially insecure as it allows the consumer to further grant the EXECUTE MANAGED TASK privilege.