Is there any easy way to retrieve table creation DDL from Microsoft Access (2007) or do I have to code it myself using VBA to read the table structure?
I have about 30 tables that we are porting to Oracle and it would make life easier if we could create the tables from the Access definitions.
I've done this:
There's a tool for "upsizing" from Access to SQL Server. Do that, then use the excellent SQL Server tools to generate the script.
http://support.microsoft.com/kb/237980
Thanks for the other suggestions. While I was waiting I wrote some VBA code to do it. It's not perfect, but did the job for me.
I never claimed to be VB programmer.
You might want to look into ADOX to get at the schema information. Using ADOX you can get things such as the keys, views, relations, etc.
Unfortunately I am not a VB programmer, but there are plenty of examples on the web using ADOX to get at the table schema.
Use Oracle's SQL Developer Migration Workbench.
There's a full tutorial on converting Access databases to Oracle available here. If its only the structures you're after, then you can concentrate on section 3.0.
You can use the export feature in Access to export tables to an ODBC data source. Set up an ODBC data source to the Oracle database and then right click the table in the Access "Tables" tab and choose export. ODBC is one of the "file formats" - it will then bring up the usual ODBC dialog.
A bit late to the party, but I use RazorSQL to generate DDL for Access databases.