SOL-C01 · Question #57
You have been tasked with configuring a session parameter for all users connecting to a specific Snowflake database named REPORTING DB'. You want to set the 'TIMEZONE parameter to 'America/Los_Angeles
The correct answer is D. ALTER DATABASE REPORTING_DB SET TIMEZONE = 'America/Los_Angeles';. D is correct because ALTER DATABASE applies the TIMEZONE parameter at the database level, meaning every session that connects to REPORTING_DB inherits this setting automatically - exactly what the task requires. A (ALTER SESSION) only affects the current session; it doesn't persi
Question
You have been tasked with configuring a session parameter for all users connecting to a specific Snowflake database named REPORTING DB'. You want to set the 'TIMEZONE parameter to 'America/Los_Angeles' for all sessions within this database. Which of the following SQL statements would BEST accomplish this?
Options
- AALTER SESSION SET TIMEZONE = 'America/Los_Angeles';
- BALTER ACCOUNT SET TIMEZONE = 'America/Los_Angeles';
- CALTER USER SET TIMEZONE = 'America/Los_Angeles';
- DALTER DATABASE REPORTING_DB SET TIMEZONE = 'America/Los_Angeles';
- EALTER WAREHOUSE SET TIMEZONE = 'America/Los_Angeles';
How the community answered
(21 responses)- B10% (2)
- C5% (1)
- D81% (17)
- E5% (1)
Explanation
D is correct because ALTER DATABASE applies the TIMEZONE parameter at the database level, meaning every session that connects to REPORTING_DB inherits this setting automatically - exactly what the task requires.
- A (ALTER SESSION) only affects the current session; it doesn't persist for other users or future connections.
- B (ALTER ACCOUNT) sets the timezone for all databases in the account - too broad, and risks affecting other databases unintentionally.
- C (ALTER USER) applies the setting per individual user, requiring you to update every user separately rather than configuring it once for the database.
- E (ALTER WAREHOUSE) targets compute resources, not session behavior;
TIMEZONEis not a warehouse-level parameter.
Memory tip: Think of Snowflake's parameter hierarchy as a funnel - Account → Database → User → Session - and match the scope of your change to the scope of the requirement. "All users in one database" = database level, so ALTER DATABASE wins.
Topics
Community Discussion
No community discussion yet for this question.