SQL 2005: Mass data copy

I need to copy data from a production database to a test database. There is a large amount of data and over 2000+ tables. The schema of the test database must be left alone, so I cannot do a backup and restore of the production database.

Once I have deleted all the data from the test database, I use the Export Wizard to move the data across. It appears to be moving all the records, but the thing I'm seeing is that Identity fields don't retain their values and so parent-child tables don't work. I have checked the "Enable Identity Insert" flag in the wizard, but it does not seem to implement it during the copy. If I compare a sequence field between the production db and test db, the values are different.

However, if I use the wizard to copy a single table using the "Enable Identity Insert" flag set, the sequence values are retained and everything works fine. The problem is, I can't do individual table moves or groups of tables in order to try to get this to work.

Is there another way to get the export wizard to work properly, or is there another (free) utility that would do this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You could use SSIS
wppiexpertsAuthor Commented:
that was one of my thoughts, but how do I set it up to loop through 2000 tables?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wppiexpertsAuthor Commented:
good link
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.