Question 100
For this Snowflake situation — An application uses two different database names but assumes CURRENT_DATABASE always follows the database named in the SELECT clause. — the team adopts: Distinguish the active session context from object names explicitly referenced in SQL statements. Which ongoing practice BEST limits the same problem recurring?
Explanation
Correct Answer
The relevant ongoing safeguard is: Set explicit session context rather than inferring it from the last table accessed. It controls the recurring exposure associated with this mechanism: Querying a fully qualified table does not necessarily change the session's current database. The original action, distinguish the active session context from object names explicitly referenced in SQL statements., still needs operational checks when the environment or workload changes.
Incorrect Answers
This routine guards against another mechanism: Snowflake configuration parameters can have hierarchical scope and more-specific settings can override defaults. The recurring exposure in the current case is: Querying a fully qualified table does not necessarily change the session's current database. The matching preventive check is “Set explicit session context rather than inferring it from the last table accessed”.
The suggested review tracks a different technical risk: JDBC is the appropriate integration interface for a Java application using SQL connections. Here the sustained control must address: Querying a fully qualified table does not necessarily change the session's current database. Choose “Set explicit session context rather than inferring it from the last table accessed”.
That safeguard is relevant to: Snowsight provides a web interface for SQL work and observing relevant query execution details. The current failure instead follows from: Querying a fully qualified table does not necessarily change the session's current database. Its prevention measure is “Set explicit session context rather than inferring it from the last table accessed”.