
Answer-first summary for fast verification
Answer: Rename the cloned schema and use an UNDROP SCHEMA statement.
Option C is correct because when a schema is overwritten by a clone operation, the original schema still exists in Time Travel but cannot be restored directly using UNDROP SCHEMA if a schema with the same name already exists. The solution is to first rename the current (cloned) schema to free up the original name, then use UNDROP SCHEMA to restore the original schema with its tables. This approach is supported by Snowflake documentation and confirmed by the community discussion, where all responses (100%) select C with upvoted comments explaining that UNDROP fails if an object with the same name exists, necessitating a rename first. Option A is incorrect because UNDROP TABLE is not applicable here—the entire schema was overwritten, not individual tables. Option B (CREATE TABLE AS SELECT) would not restore the original tables with their data and metadata. Option D is unnecessary as Time Travel allows self-service recovery within the retention period without involving Snowflake Support.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A user cloned a schema, which overwrote a schema another user was working on. The second user no longer has access to their original tables. This action happened within the database's Time Travel retention period.
How can the missing tables be recovered?
A
Use an UNDROP TABLE statement.
B
Use a CREATE TABLE AS SELECT statement
C
Rename the cloned schema and use an UNDROP SCHEMA statement.
D
Contact Snowflake Support to retrieve the data from Fail-safe
No comments yet.