Complete the code to grant usage on a share to a specific role.
GRANT USAGE ON SHARE [1] TO ROLE analyst_role;The USAGE privilege on a share allows the specified role to access the shared data. Here, my_share is the correct share name.
Complete the code to create a share with a comment describing its purpose.
CREATE SHARE [1] COMMENT = 'Share for sales data';
The CREATE SHARE command creates a new share named sales_share. The comment helps document the share's purpose.
Fix the error in the code to revoke share usage from a role.
REVOKE USAGE ON SHARE [1] FROM ROLE data_scientist;The REVOKE USAGE ON SHARE command removes access for the role data_scientist on the share named data_share. Using a database or table name causes an error.
Fill both blanks to grant select privilege on a shared table to a role.
GRANT SELECT ON [1].[2] TO ROLE reporting_role;
The command grants SELECT privilege on the table shared_table inside the schema shared_schema to the role reporting_role. The database is not specified here, so the schema and table are used.
Fill all three blanks to create a share, add a database to it, and grant usage to a role.
CREATE SHARE [1]; ALTER SHARE [1] ADD DATABASE [2]; GRANT USAGE ON SHARE [1] TO ROLE [3];
This sequence creates a share named finance_share, adds the database finance_db to the share, and grants usage on the share to the role finance_analyst_role. The schema is not added directly to the share.