I have a very large database that I need to be able to copy the statistics only from the production database server to my develoment environment. I need to be able to reproduce the execution plans on development without moving all the data. MS does this when they need to review the exeecution plan for large complex databases.
Need help.
See if this helps.
Transferring SQL Server Statistics From One Database to Another
http://www.sql-server-performance.com/jc_transferring_statistics.asp
AMB
|||Thanks for your help.
|||The technique described in the link is not a supported mechanism. It will not work in SQL Server 2005 also. It is risky to manipulate system metadata especially page pointers from one database to another. You will end up corrupting the database. The ability to create statistics and histograms for indexes is available in SQL Server 2005. You can use the SMO scripting capability to do this and create an empty database with all the stats from production. See the following topics for more details:
http://msdn2.microsoft.com/en-us/library/ms186472.aspx -- Use Script Statistics option
No comments:
Post a Comment