How to export an entire Access database to SQL Server?

marcgg picture marcgg · Aug 20, 2009 · Viewed 53.2k times · Source

I've just got a lovely Access database, so the first thing I want to do is to move it over to a normal database management system (sqlexpress), but the only solution I've found sounds like craziness.

Isn't there an "export database to .sql" button somewhere? I have around 50 tables and this export might run more than once so it would be great if I didn't have to export all the tables manually. Generating a .sql file (with tables creation and inserts) would also be great since it would allow me to keep that under version control.

I guess if it's not possible to do something simple like this I'd appreciate any pointers to do something similar.

Answer

David picture David · Aug 20, 2009

Is there a reason you don't want to use Management Studio and specify Microsoft Access as the data source for your Import Data operation? (Database->Tasks->Import, Microsoft Access as data source, mdb file as parameter). Or is there a reason it must be done from within Microsoft Access?