Start with what failed and what users still need
Suppose an analyst deletes a table while Snowflake is reachable. If the table is within its retention window, Time Travel and UNDROP may help. A short-lived problem in one workload might only require ending a conflicting job or using another warehouse. If the region or account is unavailable, access to local history alone is not a recovery path. A secondary account can host a previously refreshed copy and supporting services.
High availability keeps a service accessible during some failures. Disaster recovery is the plan to restore service after a larger disruption, where switching locations or rebuilding dependencies may be required. Time Travel recovers eligible past data. Fail-safe is a separate Snowflake-managed recovery period for eligible data, with its own limits. Plan any regional response around the failure you intend to survive.
| Failure | Possible first response | What you must verify |
|---|---|---|
| Accidental deletion | Time Travel or UNDROP if eligible | Retention, correct object version, recovered rows and grants. |
| One compute workload fails | Diagnose or move approved workloads | Queue, transaction state, and whether the published service works. |
| Regional outage | Recover to a prepared account in another region | Replication point, data, connection, access and safe resumption. |
Calculate RPO and RTO from a timeline
The recovery point is when the recovered data was current on the source. It can be earlier than the time the copy finished. Compare it with the agreed outage or last safe source cutoff. The resulting time gap describes the exposed window. It does not count the missing rows. Use the original source or another durable record to identify which rows need replay.
The recovery time starts when the agreed disruption begins. It ends when the service passes the recovery checks defined in your plan. Include detection, decision, promotion, reconnecting clients and verification. Here the targets are a 10-minute RPO and a 20-minute RTO.
| DATA_GAP_MIN | DOWNTIME_MIN | Result |
|---|---|---|
| 7 | 16 | Both objectives met for this example |
- 08:53 recovered point7 min observed gap to 09:00 outage begins
- 09:00 outage begins16 min observed interruption to 09:16 service verified
- 08:53 recovered point
- Latest verified source point in the secondary.
- 09:00 outage begins
- Seven minutes of changes may need replay.
- 09:16 service verified
- Sixteen minutes passed since impact began.
WITH drill AS (
SELECT TO_TIMESTAMP_NTZ('2026-12-02 08:53:00') AS recovered_point,
TO_TIMESTAMP_NTZ('2026-12-02 09:00:00') AS outage_started,
TO_TIMESTAMP_NTZ('2026-12-02 09:16:00') AS service_verified
)
SELECT DATEDIFF('minute', recovered_point, outage_started) AS data_gap_min,
DATEDIFF('minute', outage_started, service_verified) AS downtime_min
FROM drill;Choose what has to survive an outage
Inventory critical datasets, their write feeds, identities, permissions, warehouses, network rules, connections and monitoring. A database replica by itself does not make an application operational. Test a client login, read a known row, write a controlled marker after promotion, and confirm the downstream consumer reads from the intended account.
Choose a secondary region that satisfies residency, feature and network constraints. Estimate storage, data transfer and refresh compute. Retest recovery after workload or schema changes. If the team cannot meet the objective, document the gap and agree on the scope and cost before promising it to users.
Interview practice
Explain the decision and the evidence you would use to test it.
Beginner · How are RPO and RTO different?
RPO looks back to the latest recoverable data point. RTO looks forward from the outage to verified service restoration.
SQL · How do you count the gap from a replica?
I use the verified source data timestamp or business marker, then calculate the time to the agreed outage cutoff. Refresh completion time is a separate field.
Production · When would you choose Time Travel over failover?
For a local accidental change and an accessible account, I check retention and try a scoped historical recovery. For an unavailable region, I use the approved secondary account and recover data and application access together.
Words used in this lesson
- Recovery point objective (RPO)
- The largest gap in recoverable data the business will accept, usually expressed as time.
- Recovery time objective (RTO)
- The longest the business will accept before the defined service works again.
- Recovery point
- The latest verified source point that the recovered service contains.
- Business continuity
- The plan to keep critical work possible during and after a disruption.
Try the SQL or command
Read → predict → run in your learning environment → compare. You can also learn by reading without an account.
Use the SQL and expected outputs in the sections above.
New to SQL? Where to run it and how to read it
A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.
- No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
- For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
- Read the entire example, including comments beginning with
--. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor. - Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
- SELECT / FROM
- Choose the values to return / identify their input.
- VALUES / COLUMN1
- VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
- AS / WITH
- AS gives a result a readable name. WITH names a temporary query step within one statement.
- NULL / ::
- NULL means missing or unknown. The :: notation converts a value to a named data type.
- Session
- One connection and its settings. Keep related transaction steps in the same session.
- Database.schema.table
- A full address for stored data. It is separate from the warehouse that processes queries.
Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →
Help with common practice errors
- No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
- Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
- Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
- Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.
Before running this lesson
Maple Market is fictional. Output tables are representative. Live commands require an authorized test account and the roles, compute and edition listed in each lesson.
Check your understanding
Choose an answer, then check your reasoning. This is practice, not a scored test.
Try it yourself
A 10-minute RPO is promised with a schedule that runs every 10 minutes. A refresh took 18 minutes and the prior copy is 26 minutes old. Has the plan met its objective?
Compare your reasoning
No. The latest verified recoverable point is 26 minutes behind. Investigate scheduling, refresh duration and failures. Revisit the design or the target rather than citing the configured interval.
Connect this lesson to the learning path
Official sources and curriculum
Module 20 · See module scope
By Rohit Ray · Independent educational lesson · Explore this visual lab