Blogs

Paul Kimmel's Blog

Upsizing an MS Access 2007 Database to SQL Server

     

Working on the book project—Professional DevExpress ASP.NET Controls at http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470500832.html—I needed to convert an existing Access database to SQL Server 2005. Unfortunately sometimes even Google doesn’t find you a straight forward solution. Its not Google’s fault. In this case its just that there are so many security issues, Trust Center nonsense, and other glitches that some tips just take to long.

If you are in a hurry the fastest way to upsize a database actually seems to be to go backward to go forward. Here is a quick, pretty painless way to move an Access 2007 database to SQL Serve 2005—if you are getting permission and Trust Center errors other ways.

  1. Open you Access 2007 database (*.accdb)
  2. In Access 2007 Choose Save As|Access 200 Database
  3. Pick a new file name with the .mdb extension.
  4. Click Save. (This step makes a copy of your Access database as a .MDB file)
  5. Close Access
  6. Open Microsoft SQL Server Management Studio
  7. Expand Databases
  8. Right Click Databases in the Object Explorer and click New Database
  9. Provide a database name (see Figure 1) and Click OK.
  10. Right click the new database in the Object Explorer
  11. Click Tasks|Import which will start the SQL Server Import and Export Wizard
  12. Click Next
  13. In the Choose Data Source wizard pick the Microsoft Access data source
  14. use the Browse button and brose to your Access database (see Figure 3)
  15. Click Next
  16. Chose a Destination (the database you created in steps 8 and 9) (see Figure 4)
  17. Click Next
  18. In the Specify Table Copy or Query use the default Copy option (see Figure 5)
  19. Click Next
  20. Select all of the tables you and views you want to copy
  21. Click Next
  22. Click Finish (to execute immediately)
  23. Click Finish again (too many steps again, as far as I am considered)
  24. Click Close after the wizard runs (see Figure 6)

This is a lot of steps, but it worked on my Vista box and converted an Access 2007 database to SQL Server 2005 without any goofy Trust Center issues, no security setting changes, and the least amount of headache. Borrowing from Alan Cooper’s—creator of Visual Basic—ideas in the book The Inmates are Running the Asylum sometimes software makes us perform too many of the equivalent of “are you sure steps”. There should be one button—upgrade to SQL Server—that in one step upgrades everything. One click and I get the result wanted. Tables, views, and stuff unneeded can be removed later. A lot of times the most obvious thing is what people want, sort of the equivalent of a one-click or easy button.

If you have to convert Access to SQL Server and you are getting warnings perhaps this approach will work best for you.

image 
Figure 1: Create a New SQL Server database in SQL Server Management Studio.

image
Figure 2: The SQL Server Import and Export Wizard.

image 
Figure 3: Choose Microsoft Access and brose to your Access 2000 .mdb file.

image
Figure 4: Pick your destination SQL Server database.

image
Figure 5: Indicate that you want to copy data from one or more tables or views.

image
Figure 6: The wizard running.

Published May 20 2009, 12:26 PM by Paul Kimmel (DevExpress)
Bookmark and Share

Comments

 

Alex said:

The standalone SQL Server Migration Assistant for the Access tool makes the process of migrating even easier :)

Learn more at: www.microsoft.com/.../migration-access.aspx

May 20, 2009 9:49 AM
 

Boris Bosnjak said:

Thanks for these posts, Paul.  It's interesting how you're hitting various "real world" problems we developers encounter and need answers and solutions for.  Not only does it enrich the DevEx knowledgebase, it also bodes well for the success of your book :-)

May 20, 2009 10:36 AM
 

Peter Thorpe said:

Is there some kind of problem with the upsizing wizard in Access 2007? Or maybe you were just looking for a solution in the server tools.

I've used the sql server migration in Access 2007 before with no problems.

May 20, 2009 10:53 AM
 

Paul Kimmel (DevExpress) said:

Alex: Thank you.

May 20, 2009 3:12 PM
 

Paul Kimmel (DevExpress) said:

Boris: I try to blog or write about everything. The Internet is unlimited and someone else might need the idea. the standalone migration too is probably the way to go. Haven't needed to migrate an Access database lately. The book does have all kinds of twists in it.

May 20, 2009 3:14 PM
 

Renaud Bompuis said:

The upsizing Wizard in Access does it too.

It currently doesn't work for SQL Server 2008 though.

What's the issue with the Trust Center? In Access 2007, if you're getting that warning the only thing you need to do is add the path to the directory where your database are to make it a trusted location.

You can even make its sub-directories trusted.

But as Alex pointed out, SSMA is probably the more capable tool for this.

May 20, 2009 9:13 PM
 

Paul Kimmel (DevExpress) said:

Renaud:

I saw the path bit. Of course, if you want to upsize once then changing the Trust Center implies one is blowing holes in security. Running on admin on a local machine, one would think admin permission means I can do anything. I'd like to see a simple one-click or easy button approach for a lot more of these kinds of tasks. Thanks for writing.

May 21, 2009 7:01 AM
 

Changoleon said:

Excelent, post.

but there is a tool to do it much more easy:

www.microsoft.com/.../details.aspx

May 22, 2009 4:49 PM
 

NTC said:

to upsize or not to upsize - that is the question...(or was for us)

kind of a big deal to step up to sqlserver....we kind of dodged it by going to a WAN replication service from AccessTables.com  and stayed with Access....at least for the time being.....the upsizing was just one issue...dealing with a web front end or terminal services was part it too...

October 20, 2009 7:06 PM
 

sooraj said:

awesome!!

July 15, 2010 2:19 AM
 

toplum said:

sure hope inplace will be possible. lots of customers want that.

August 21, 2010 9:33 AM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.