SQL Flow Field Guide

DBCC CLONEDATABASE

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

creates a schema-only clone

What changes

Input
source database schema and statistics
Output or change
new read-only schema-only database

Syntax at a glance

DBCC CLONEDATABASE ( source_database_name , target_database_name ) [ WITH { [ NO_STATISTICS ] [ , NO_QUERYSTORE ] [ , VERIFY_CLONEDB | SERVICEBROKER ] [ , BACKUP_CLONEDB ] } ]

Work example

A plan regression needs a schema and statistics clone without copying application rows.

Create the clone only in an approved nonproduction instance and record its source and purpose.

Check your work The clone contains definitions and statistics but no user table data.

Open Microsoft Learn for full syntax, permissions, and details for your version.