Before writing a CREATE DATABASE ROLE statement:
- Read
references/parameters.mdto review all available parameters and their defaults. - For each parameter, decide whether the user's request implies a non-default value.
- Include only the parameters that differ from the default or that the user explicitly requested.
- Never use
CREATE OR REPLACE— always useCREATE DATABASE ROLE IF NOT EXISTS. - Always qualify the role name with the target database (e.g.,
<db_name>.<role_name>) unless the current session database is already confirmed. Always add a COMMENT describing the role's purpose. Note that upon creation Snowflake automatically grants the USAGE privilege on the containing database to the new database role, so an explicit GRANT for that is not needed.