Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Snowflake Exam DSA-C02 Topic 4 Question 44 Discussion

Actual exam question for Snowflake's DSA-C02 exam
Question #: 44
Topic #: 4
[All DSA-C02 Questions]

A Data Scientist as data providers require to allow consumers to access all databases and database objects in a share by granting a single privilege on shared databases. Which one is incorrect SnowSQL command used by her while doing this task?

Assuming:

A database named product_db exists with a schema named product_agg and a table named Item_agg.

The database, schema, and table will be shared with two accounts named xy12345 and yz23456.

1. USE ROLE accountadmin;

2. CREATE DIRECT SHARE product_s;

3. GRANT USAGE ON DATABASE product_db TO SHARE product_s;

4. GRANT USAGE ON SCHEMA product_db. product_agg TO SHARE product_s;

5. GRANT SELECT ON TABLE sales_db. product_agg.Item_agg TO SHARE product_s;

6. SHOW GRANTS TO SHARE product_s;

7. ALTER SHARE product_s ADD ACCOUNTS=xy12345, yz23456;

8. SHOW GRANTS OF SHARE product_s;

Show Suggested Answer Hide Answer
Suggested Answer: C

CREATE SHARE product_s is the correct Snowsql command to create Share object.

Rest are correct ones.

https://docs.snowflake.com/en/user-guide/data-sharing-provider#creating-a-share-using-sql


Contribute your Thoughts:

Janessa
9 days ago
That makes sense. So, the correct answer is D. Thanks for clarifying!
upvoted 0 times
...
Yuriko
12 days ago
Because the ALTER SHARE command should not have the keyword 'ADD'.
upvoted 0 times
...
Yvonne
21 days ago
Haha, option D is definitely the odd one out. Who would share a database with accounts named xy12345 and yz23456? What are those, secret agent codes?
upvoted 0 times
Anabel
1 days ago
I know, right? It's definitely an interesting choice for sharing databases.
upvoted 0 times
...
Bernardo
9 days ago
Haha, you're right! Those account names do sound like secret agent codes.
upvoted 0 times
...
...
Janessa
21 days ago
Why do you think D is incorrect?
upvoted 0 times
...
Yuriko
22 days ago
I disagree, I believe the incorrect command is D.
upvoted 0 times
...
Janessa
29 days ago
I think the incorrect SnowSQL command is C.
upvoted 0 times
...
Ryan
1 months ago
Option B looks good to me. Creating a direct share is the right way to share the database and its objects.
upvoted 0 times
Veta
23 days ago
Then we can add the necessary accounts to the share using ALTER SHARE command.
upvoted 0 times
...
Rashad
25 days ago
After creating the direct share, we need to grant usage on the database to the share.
upvoted 0 times
...
Nathalie
29 days ago
Option B is correct. Creating a direct share is the first step.
upvoted 0 times
...
...
Elouise
1 months ago
I think option C is incorrect. The table name should be product_db.product_agg.Item_agg, not sales_db.product_agg.Item_agg.
upvoted 0 times
Phung
17 days ago
Thanks for pointing that out. The correct command should be GRANT SELECT ON TABLE product_db.product_agg.Item_agg TO SHARE product_s.
upvoted 0 times
...
My
1 months ago
Yes, you are right. It should be product_db.product_agg.Item_agg instead of sales_db.product_agg.Item_agg.
upvoted 0 times
...
Amie
1 months ago
Option C is incorrect. The table name should be product_db.product_agg.Item_agg, not sales_db.product_agg.Item_agg.
upvoted 0 times
...
...

Save Cancel