You can use comparison tools that compare database schemas and data and first synchronize a blankblank database schema with the original db, to create all the tables.
Then, synchronize the data from the original database with the new one (all tables are there, but they are all empty) to insert the records into the tables I
I use ApexSQL Diff and ApexSQL Data Diff for this, but there are other similar tools The.
The good thing about this process is that you don't have to actually synchronize the databases using the tool, as this can be quite painful for millions of rows. You
You can just create an INSERT INTO SQL scriptcreate an INSERT INTO SQL script (don't be surprised if it's several gigs) and execute it. As
As so large scripts cannot even be opened in SSMSSQL Server Management Studio, I use sqlcmd or osql