Creating a test DB | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Creating a test DB

Hi, I have a production database that has about 6GB of data.
I would like to create a test DB, that will be a replica of that production
database on a different SQL server. I don’t want to overburden the production server, or wait for several hours
until the data is transferred between the two servers – which is why I only
want to copy some of the data from the production server to the live server. How would I go about, replicated the production database, but limiting the
number of rows exporte to the test database to say… 500?
Thank you
The best option to use is BACKUP file of production database, restore on the test machine and delete the rows those aren’t required. This way there will be no interaction to the production server during the process on test box. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
After Satya’s recomendations, update statistics on test server.
Luis Martin …Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
If it is a one time thing, you might want to consider restoring a backup on the TEST server. That would be the easiest way. Otherwise, you could use DTS or BCP with a limited ROWCOUNT (or TOP x). If your table are related with a PK, you could create a small table containing all PKs you wish to export and join it with the other table.
]]>