I’m replacing an in house built application with a new (in house) application. Part of this process involves migrating data from the old application to the new one. Both applications are using SQL Server 2005 (SP1).
As there have been changes to the way data is structured I am developing an import script that will take data from the database for the old application and create entries in the database for the new application.
The only problem I have is that the database for the live application is 120Gb and running the import script against a copy of the live database takes a considerable length of time.
I’m looking at reducing the size of a copy of the live database for this stage of testing. that way the import will run faster and results will be easier to check (once I’m satisfied with the results of importing the “restricted” database I can perform a test on the whole thing)
Unfortunately I haven’t done anything like this with an SQL Server database or even sure whether it is possible. Has anyone tried to do something similar with an application migration?
You can try using
like queries. But this can be done to some highly loaded tables only. For example, there can be three tables like;
if “customers” is the highly loaded table, you can try converting only the top 1000 customers (or maybe less) but all the products since product table is smaller. And then you should convert only needed IDs from customer<->product relation table which is the top 1000 customer IDs from customers table.
So, you need to choose your heavy tables and write special codes for the tables which use relations to their unique fields.