Sunday, August 23, 2009

Importing an Access database into SQL Server

I have an old application I want to rewrite. It uses an Access database and considering there's more about a 1000 records in it, I am not about to manually re-add the data. As part of the upgrade I wanted to work with SQL Server instead. So what's a quick way to upgrade?

I have Access & Microsoft SQL Server 2008 installed. I have a blank database on SQL server set up to import the data into.

  1. Go to Start > Microsoft SQL Server 2008> Import and Export Data. This begins a simple Wizard process
  2. Select the source that you want to import from (in this case Access) & browse to the location of the Access database.

    Set any options like passwords. I'm doing a straight conversion into a blank database. I don't need to do any special queries, but you could specify which tables the data goes into, which tables you want to import and which ones you don't.
  3. Click the ok button :)

If everything goes well, when you hook into SQL Server, your data will all be there!

More info from MSDN: http://msdn.microsoft.com/en-us/library/ms188032.aspx