There is a new command DBCC CLONEDATABASE from latest SQL Server 2014 SP2, SQL Server 2016 SP1 release. It’s designed to collect the database objects definition, index statistic and query store info without table data. It’s useful when support team need to investigate the performance issue like suboptimal execution plan remotely. Using DBCC CLONEDATABASE could keep all index stats and query store beside the real production data which may be sensitive or with huge size. It may be used to keep a version of database without index stats or query store info. For more detail you could check KB 3177838.
Beside what has been documented in KB 3177838, there is one known non supported object, the encrypted objects. There will be no warning when you run the command, the encrypted objects will be copied but there will be error when calling the encrypted objects in cloned database. Make sure you provide the decrypted plain text if that object what you need to investigate or keep the source in other way.
Posted by Shiyang Qiu, Nov 18, 2016
Special thanks to Parikshit Savjani for KB 3177838 revision