Export MS Access Database to SQL Server 2008 Express - sql

Is there an easy way to export a MS Access Database backend (Tables & relations) into an SQL Server database, so that it then can be used as a backend for a tailored application written in C# using Entity Framework?
The Access Database contains at least 50 tables and the export should not ruin its structure and relations.

Microsoft SQL Server Migration Assistant for Access

As Gabriel indicates using the SSMA is the best solution for upsizing the tables, indexes and relationships in Access. Then I'd suggest working on the Access front end, containing the queries, forms, reports, macros and VBA code so it works with the SQL Server data storage. This won't take very long by comparision to rewriting the app.
Then you may find you don't need to rewrite the application in another environment. This assumes that the tables are properly normalized and clean. Even then it may be simpler to do some cleanup in that respect in Access.

The Microsoft SSMA link in the comment from 2010 only worked when I chose NOT to register. Also, here is an updated link to the MS SSMA executable.

There are Upsizing Wizard for Access to do the migration to MSSQL 2008.
Goto [Database Tools] menu and click on [SQL Server] icon, then proceed the migration with the wizard.

Related

Converting an Access database to SQL

I am a programmer and am wanting to undertake a project of converting an Access database to an SQL database.
Is this pretty easy to do? Can I just use a tool to create all the tables with the same names and 'copy' over the data?
I know that Access has built in reporting features. Does SQL have these reporting features? If not, is it easy to create them?
You just need to import your access to sql server database.
Check this tutorial:
Importing Microsoft Access 2007 Database Tables into SQL Server
Regards
MS Access is not a database at all, by default, it uses the Jet or ACE database to store data, but Access will also work perfectly well with data stored in a number of other databases, MS SQL included. There is no need to change from an MS Access front-end when you are moving the tables to a new back-end. SQL Server does not have all the user-interface and reporting tools that MS Access has, it is a database, not "a rapid application database development and reporting tool"
Try this one its free from microsoft.

Creating SQL statements for creating tables in SQLce database

I'm starting to learn database, and I will work with SQLce. Is there some type of library that can assist in creating the proper SQL statements for creating tables etc? (Not for query of the database, as I plan to use LINQ). I'm not thinking an MS library, but some amateur project maybe..
You want to download SQL Server Management Studio Express. The SSMS tools let you connect to SQL CE as well as the full blown SQL Server databases, and best of all it's free. You can create your tables via the GUI, and then instead of saving the table, you could have it show you the SQL script instead and learn that way. Everything you do in the GUI executes T-SQL behind the scenes and you have the option of saving all that SQL and running it yourself.
See this stackoverflow question here too for some more details.

Migrating Access Tables to SQL Server - Beginner

I'm working in an Access 2007 database and need help migrating tables to SQL server. Is this possible to do having only purchased Access 2007 or do I need to download a separate program for SQL? When I try to create a new SQL database or open an existing one through Access, I'm getting a "CREATE DATABASE" or "CREATE TABLE" error and not sure what the issue is. Any advice would be greatly appreciated!
Take a look at the microsoft's SQL Server Migration Assistant 2005 for Access (v4.0) which supports access 97 - 2007
Yes, you need to install it. There is a free edition of SQL Server, called Sql server express. Database size limit is 4gb. If it suits you go for it. Also, i belive Access has migration tool built in.
Update: In Access 2007 - Database Tools -> Move Data -> Sql Server ( follow the wizard ).

Moving from Microsoft Access 2007 to Sql Server 2005

I have MS Access 2007 Databases and VBA modules associated with it.
I Now want to upgrade my project so as to use Sql Server 2005 and Vb.net using visual studio.net.
Can any one suggest Complete details on the transfer without much hassle or data loss.?
Thanks In Advance
Per RBarry's answer...the data migration to SQL Server is easy using the SQL Server Migration wizard. Then you will have a working microsoft access application (probably but maybe it will require polishing and tweaking).
To convert the front end (ui) to vb.net there might be a converter but even if there is one you would likely have to do a lot of it manually anyway. So you treat the access version like a prototype and you start building your app in vb.net by hand.
Seth
Start with the Ms-Access SSMA site: http://www.microsoft.com/sqlserver/2005/en/us/migration-access.aspx
I am not aware of a migration guide specifically for Access -> SqlSever, however, there is a very extensive Oracle -> SqlServer Migration Guide that you could easily cherry-pick for a project plan.
I use SQL Server to import data from Access databases. Be aware that it won't import your keys or relationships- you'll need to recreate those.
Your VBA code is specific to Access. You'll need to rewrite it in VB.NET.
The Access queries are probably going to cause you the most trouble. Simple ones can be converted with the Upsizing Wizard, but the more complex ones will have to be rewritten in SQL.
Also note SQL Server objects follow different naming conventions. An Access table is typically prefixed with tbl, SQL tables typically aren't named with a prefix.

Can SSMA for migrating Access databases to SQL Server 2005 be automated?

I need to migrate Access databases to SQL Server 2005. Since this needs to be done from within a setup so that a customers' installation is transparently migrated to SQL Server 2005, I wonder if it is possible to automate the SSMA toolkit from Microsoft.
Actually SSMA had command-line interface (special console executable in the SSMA installation folder). It was available at some time but I'm not sure whether it made its way to last release. You should ping SSMA support about what versions had it and what examples of its usages are available. I hope this will help you.
To my own knowledge, such an automation is not available. But it is still possible for you to generate the SQL code that creates the database (the one that will begin with the "CREATE DATABASE" sentence) and launch it through your user interface on your SQL server.
To generate this code, you can
Create the access database with the Access toolkit
Generate the corresponing "CREATE DATABASE" SQL code with (for example) SQL Server Management Studio (right-click on database, choose "script database as CREATE". EMS SQL Studio offers a very nice alternative to SQL Server Management Studio
Save the code for further use
With EMS Studio, You can even decide if this code also updates the data. But I'd prefer to automate data transfer through code: you can for example browse the tables (in the right order, depending on relationships), open recordsets (one local, one SQL), and transfer data by browsing the fields (you do not even need to name them) with code like:
(localRecordset links to local table. can be DAO or ADODB; Adjust code accordingly)
(sqlRecordset links to the SQL server. can be DAO or ADODB; Adjust code accordingly)
localRecordset.moveFirst
Do while not localRecordset.EOF
sqlRecordset.addnew
For each field in localrecordset.fields
sqlRecordset.fields(field.name).value = field.value
Next field
sqlRecordset.update
localRecordset.moveNext
Loop