I realize you can use the upsize wizard in access to convert this normally but as this is a server side process where we are getting the mdb files from a third party on a daily basis, I have to be able to ingest these with a no touch architecture.
Currently, I’m about to set out to write it all by hand (ugh) where I read the access database through a datasource and punch it up into sql server through bulk inserts or entity framework. I really wish there were a better way to do this though. I’m willing to entertain lots of creative methods as there are a LOT of tables and a TON of data.
There are a number of methods that come to mind, which do all indeed involve custom programming, but should be relatively simple and straightforward to implement.
insert dest select * from source).OPENDATASETorOPENROWSOURCEwith SQL Server to directly connect to the Access DB and copy the data. You can use againinsert dest select * from sourceto copy the data, orselect * into dest from sourceto create a new table from the source data. This involves tweaking some system settings on sql server since it’s not enabled by default, but a few google searches should get you started.SqlBulkCopy(which is the .NET class for automatingbcp) to upload data from the Access database. Just work with the data directly with ADO.Net, as there’s no reason to build an entire EF layer just for migrating data from one source to another.I have used variations of all three methods above in various projects, but for moving a large number of tables, I have found option #2 to be relatively efficient. It will involve some dynamic SQL code if your table names are dynamic on a daily basis, but if they are static, you should only have to write the logic once and use a parameter for the filename to read from.