Is it possible to generate a sql script that contains CREATE and INSERT statements for some tables within an Access database?
Asked
Active
Viewed 2.5k times
3 Answers
4
Take a look at Access To MySQL conversion tool, it allows the generation of a dump file ...
-
This was still relevant for us as we're still leaving the bad, old Access world. We didn't dump, but let it do the full migration. I had some trouble though where this tool couldn't drop & create tables in an empty SQL Server 2017 database. However, this was due to Windows Authentication and apparently some lacking rights (it may be that the tool internally uses SQL TRUNCATE for unlogged deletes). So it was solved by logging in as 'sa'. :) Upvote for an otherwise still perfect solution! – Jonas Nov 02 '18 at 13:06
-
Can this tool dump individual tables one at a time? – posfan12 Dec 16 '19 at 17:12
-
I can't get this program running. It asks for 32-bit version of MySQL ODBC driver, and 32-bit version of something called AccessDatabaseEngine, which Microsoft doesn't allow you to install on 64-bit systems. Of course, the homepage of this tool doesn't mention any of this. Just wasted an hour on this junk. – posfan12 Dec 16 '19 at 17:50
1
I've used Access to MySQL and Access to MSSQL (both free) before with success.
It can produce SQL Dumps for their respective targets. Download link
andyhky
- 2,652
- 1
- 25
- 26
0
Jet/ACE supports DDL, yes, but not as fully as some other SQL dialects. It also has its idiosyncracies.
But keep in mind that Jet/ACE can execute only one statement at a time -- no batching of multiple statements in a single "script." Each DDL statement has to be executed one at a time, in succession.
David W. Fenton
- 232
- 1
- 7
-
2Not sure that answered the question... it seems that DDL support was understood as available, but was looking for a solution to generate a SQL script from an existing Access database. Or I could be wrong. – AnonJr Sep 22 '10 at 03:35
-
-
That wasn't by any means clear to me from the wording of your question. – David W. Fenton Sep 23 '10 at 21:10