Wednesday, September 19, 2018

I didn't know this - DBCC CLONEDATABASE

To copy a database for debug/troubleshoot - but only copy structure & stats

DBCC CLONEDATABASE(SourceDB, TargetDB);

SQL 2014 and above

https://www.itprotoday.com/data-privacy/why-you-should-be-using-dbcc-clonedatabase-performance-tuning-queries

How to use DBCC CLONEDATABASE to generate a schema and statistics only copy of a user database in SQL Server 2014 SP2 and SQL Server 2016 SP1

No comments:

Post a Comment