Welcome

Passionately curious about Data, Databases and Systems Complexity. Data is ubiquitous, the database universe is dichotomous (structured and unstructured), expanding and complex. Find my Database Research at SQLToolkit.co.uk . Microsoft Data Platform MVP

"The important thing is not to stop questioning. Curiosity has its own reason for existing" Einstein



Monday 21 February 2011

Clone a SQL Database

Microsoft have written an article which explains how to clone a database. This allows for a copy of the database to be made without any data contained within it. This is advantageous as it protects sensitive data and prevents the need to move large data files. The article is ‘How to generate a script of the necessary database metadata to create a statistics-only database in SQL Server 2005 and in SQL Server 2008 at http://support.microsoft.com/default.aspx?scid=kb;EN-US;914288

This is available in SQL Server Management Studio for SQL Server 2005 SP2 and later and SQL Server 2008 and later. It is necessary to script all database objects in the database and change the advanced options setting to include items such as Script Statistics and histograms