ADA-C01 Question 475
Single answerImport and maintain inbound data sharesA consumer account receives a secure data share named SALES_SHARE from a provider. The Snowflake administrator creates a database from the share for analysts by running CREATE DATABASE sales_shared_db FROM SHARE provider_org.provider_account.SALES_SHARE;. A week later, analysts report that a newly added schema and table from the provider are not visible in sales_shared_db, even though the provider confirms they granted the objects to the share. The administrator wants to make the new shared objects available with the least disruption to existing analyst queries and without recreating the database. What should the administrator do?
- A
Run ALTER DATABASE sales_shared_db REFRESH to synchronize the database created from the share with the latest objects in the provider share.
- B
Run GRANT IMPORTED PRIVILEGES ON DATABASE sales_shared_db TO ROLE analyst_role so the role can see newly added schemas and tables from the share.
- C
Drop and recreate sales_shared_db from the share so Snowflake reimports the provider's latest objects.
- D
Ask the provider to re-share the database because inbound shares cannot be updated after the consumer creates a database from the share.
Show answer and explanation
Correct answer: A
Explanation
When a consumer creates a database from a provider share, the shared database is read-only in the consumer account. Access to the shared database is controlled through imported privileges, but visibility of newly added shared objects depends on refreshing the imported database metadata. The correct administrative action is ALTER DATABASE ... REFRESH, which updates the database created from the share to reflect changes the provider made to the share, such as adding schemas or tables. This approach aligns with Snowflake best practices for maintaining inbound shares because it minimizes disruption and avoids unnecessary recreation of the shared database. By contrast, GRANT IMPORTED PRIVILEGES addresses role access, not metadata synchronization; dropping and recreating the database is operationally heavier than needed; and inbound shares are designed to be updated over time by the provider and refreshed by the consumer.
- A. Correct.
Correct. A database created from a share does not automatically expose newly added objects until the consumer refreshes it. ALTER DATABASE <db_name> REFRESH updates the imported database metadata so newly granted shared objects become visible, without dropping and recreating the database. This is the least disruptive option and preserves object references for existing users.
- B. Incorrect.
Incorrect. GRANT IMPORTED PRIVILEGES is required to allow roles to use objects in a shared database, but it does not refresh the metadata of the imported database. If the database has not been refreshed after the provider adds new objects to the share, granting imported privileges alone will not make those new objects appear.
- C. Incorrect.
Incorrect. Recreating the database would work, but it is unnecessarily disruptive and does not meet the requirement to avoid recreation. It could also affect existing grants, references, and user access patterns. Snowflake provides a refresh operation specifically for this use case.
- D. Incorrect.
Incorrect. Inbound shares can be maintained after creation. Providers can add objects to a share, and consumers can update the imported database metadata by refreshing it. Re-sharing the database is not required simply because new schemas or tables were added.