Key Terms โ Zero-Copy Cloning
Zero-Copy Clone
A metadata-only copy of a database, schema, or table that references the same underlying micro-partitions. No data is physically duplicated โ instant and free at creation.
CREATE ... CLONE
The SQL command to create a zero-copy clone of a database, schema, or table.
Clone + Time Travel
Cloning AT or BEFORE a specific point in time, creating a snapshot of the object as it existed in the past.
Child Clone
When cloning a database or schema, all child objects (tables, views, stages, etc.) are cloned recursively.
Micro-Partition Sharing
Source and clone share the same physical micro-partitions until one side modifies data โ then only changed partitions are written independently.
What is Zero-Copy Cloning?
Zero-copy cloning creates an instant, metadata-only copy of a database, schema, or table. No data is physically duplicated โ the clone points to the same underlying micro-partitions as the source.
Zero-Copy Cloning Mechanics
Diagram showing: Source table points to micro-partitions MP1, MP2, MP3, MP4. After CREATE TABLE clone CLONE source, the clone table also points to the same MP1, MP2, MP3, MP4. No data copied โ both share the same storage. When the clone later modifies data affecting MP2, a new MP2-prime is created for the clone while the source still points to the original MP2. Only the changed partition uses additional storage.

A clone consumes zero additional storage when first created. Storage costs only accrue when data in either the source or clone is modified, because only changed micro-partitions are written independently. This is a favourite exam topic.
Creating Clones
1-- Clone a table2CREATE TABLE orders_dev CLONE orders;34-- Clone a schema (all child objects cloned recursively)5CREATE SCHEMA staging_clone CLONE staging;67-- Clone an entire database8CREATE DATABASE analytics_dev CLONE analytics;910-- Clone with Time Travel โ snapshot from the past11CREATE TABLE orders_backup CLONE orders12AT (TIMESTAMP => '2024-06-15 09:00:00'::TIMESTAMP_NTZ);1314CREATE TABLE orders_before_delete CLONE orders15BEFORE (STATEMENT => '01a1b2c3-0000-0000-0000-000000000001');1617-- Clone at a specific offset18CREATE TABLE orders_1hr_ago CLONE orders19AT (OFFSET => -3600);What Can Be Cloned?
Cloneable vs Non-Cloneable Objects
- Internal stages are cloned but empty โ files are not copied
- Streams are cloned but the offset resets โ historical change data is not preserved
- Tasks are cloned in a suspended state โ they do not automatically start running
- Pipes are cloned in a paused state
Clone + Time Travel
You can clone an object as it existed at a past point in time, effectively creating a historical snapshot.
1-- Recover a dropped table using clone + Time Travel2-- Step 1: The table was accidentally truncated 30 minutes ago3CREATE TABLE orders_recovered CLONE orders4AT (OFFSET => -1800);56-- Step 2: Verify the data7SELECT COUNT(*) FROM orders_recovered;89-- Step 3: Swap if needed10ALTER TABLE orders SWAP WITH orders_recovered;Both CLONE AT and UNDROP can recover data. UNDROP restores a dropped object with its original name. CLONE AT creates a new object from a past snapshot โ the original remains unchanged. CLONE AT works even if the object was not dropped (e.g., after an accidental UPDATE or TRUNCATE).
Privileges and Cloning
- Table clones do NOT inherit grants โ the cloning role becomes the owner
- Schema clones do NOT inherit grants on the schema or its child objects
- Database clones do NOT inherit grants on the database, its schemas, or child objects
- The role that executes CREATE โฆ CLONE becomes the owner of the clone and all its children
- To preserve grants, use CREATE โฆ CLONE โฆ COPY GRANTS (available for databases and schemas)
1-- Clone database and preserve grants2CREATE DATABASE analytics_dev CLONE analytics COPY GRANTS;34-- Clone schema and preserve grants5CREATE SCHEMA staging_dev CLONE staging COPY GRANTS;67-- Note: COPY GRANTS is not available for individual table clonesStorage and Billing
Clone Storage Over Time
Timeline diagram: At creation (T0), clone uses 0 additional storage. At T1, source table receives an UPDATE affecting 10% of data โ 10% new micro-partitions created for source. At T2, clone table receives a DELETE affecting 5% of data โ 5% new micro-partitions created for clone. Total additional storage = only the changed partitions on each side. Shared (unchanged) partitions are counted once in storage billing.

Snowflake uses a copy-on-write model. Shared micro-partitions are billed once (to the source). When either side modifies data, only the new/changed micro-partitions incur additional storage cost on that side. Time Travel and Fail-safe apply independently to both source and clone.
Common Use Cases
Common Cloning Patterns
Development and testing
Clone production to create a dev/test environment with real data โ instantly and at zero initial cost.
CREATE DATABASE prod_dev CLONE production;Disaster recovery
Clone with Time Travel to recover from accidental data modifications.
CREATE TABLE orders_recovered CLONE orders
AT (OFFSET => -3600);Pre-release snapshots
Clone before a major deployment so you can quickly roll back if needed.
CREATE SCHEMA release_backup CLONE app_schema;Data sandboxing
Give analysts a clone to experiment with โ modifications do not affect the source.
CREATE SCHEMA analyst_sandbox CLONE analytics;
GRANT USAGE ON SCHEMA analyst_sandbox TO ROLE analyst_role;Cheat Sheet
Zero-Copy Cloning Quick Reference
Key Facts
Storage at creationSpeedCloneableNot cloneableGrantsCommands
Basic cloneTime Travel cloneClone + grantsSwapPractice Quiz
How much additional storage does a zero-copy clone consume when first created?
When you clone a database, what happens to tasks in the cloned database?
Which statement about clone privileges is correct?
Flashcards
How does zero-copy cloning work at the storage level?
The clone shares the same micro-partitions as the source (metadata-only copy). When either side modifies data, only the changed partitions are written independently (copy-on-write). Zero additional storage at creation.
What objects can be cloned in Snowflake?
Tables (permanent, transient, temporary), schemas (all children recursively), and databases (all schemas and children). Streams, tasks, and pipes are included but with caveats: streams lose offset, tasks are suspended, pipes are paused, internal stages are empty.
How does cloning interact with Time Travel?
You can clone AT or BEFORE a timestamp, statement ID, or offset to create a snapshot from the past. This is useful for recovering from accidental modifications without UNDROP. Time Travel and Fail-safe apply independently to both source and clone after creation.
What happens to grants when you clone a database?
By default, grants are NOT inherited โ the cloning role becomes owner of the clone and all children. Use COPY GRANTS to preserve the original grants. COPY GRANTS is available for database and schema clones but not individual table clones.
What is the difference between CLONE AT and UNDROP?
UNDROP restores a dropped object with its original name. CLONE AT creates a new object from a past snapshot โ works even if the source was not dropped (e.g., after accidental UPDATE/TRUNCATE). Both leverage Time Travel.
Resources
Next Steps
Reinforce what you just read
Study the All flashcards with spaced repetition to lock it in.