Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Importing Access databases into SQL Server

From: SQL Server 2008 Essential Training

Video: Importing Access databases into SQL Server

If the requirement you have is to take an Access database and get back into SQL Server, either all of it or part of it, you have a couple of ways of doing that. Not surprisingly one of them is using the Import and Export Wizard. But it's possibly a little different from what you're expecting. If I pick the 32-bit one, I am going to click the Next button and then when I select my data source, I could just easily carry on and select Microsoft Access. It asks me to browse the file. It's looking for an Access database.

Importing Access databases into SQL Server

If the requirement you have is to take an Access database and get back into SQL Server, either all of it or part of it, you have a couple of ways of doing that. Not surprisingly one of them is using the Import and Export Wizard. But it's possibly a little different from what you're expecting. If I pick the 32-bit one, I am going to click the Next button and then when I select my data source, I could just easily carry on and select Microsoft Access. It asks me to browse the file. It's looking for an Access database.

But I'm browsing to my desktop and it doesn't show up. That's because it's going to be looking for the old school pre-Access 2007 Access files, .mdb files which are not going to show up. If I try and bypass that by just selecting all files and then I will select this classic Northwind Access database. It's in the .accdb format. I could try that. I'll click Next and it's not going to work at all. That's because this original data source is old school Microsoft Access.

It's not going to work. Well, what can I do? Well, not a lot immediately, because what you need to have installed-- and I'm just going to open up an Internet Explorer. If you are importing from Access 2007 or Access 2010, before you do this, you will need to go out to microsoft.com/downloads and download some connectivity components. In fact, that's what I am going to search for here is the phrase "data connectivity components." You'll see a couple of different choices here.

If you have the 2007 version, you can get the Office 2007 System Driver: Data Connectivity Components. You want it to come from Access 2007. If you're coming from Access 2010, get the Microsoft Access Database Engine 2010 Redistributable, which comes in two versions, either the 32-bit or the 64-bit. Now I've installed the 64-bit. What does that mean? Well, it means right now when I open up my 64-bit Import/Export Wizard, what I'm going to find on this is a data source of Microsoft Office 12.0 Access Database Engine.

Now this, formally speaking is what's called an OLE DB Data Provider, which is a little bit of a tedious phrase. In fact, when you try and open it, it's not going to just say "Well, point to the accede." Really that's what it's after. It just doesn't make it obvious. So it says "Enter the data source and/or location of the data." Location is blanked out. But I actually can enter the data source of this. In fact, if I just right-click it to find the address of it here, it's right here on my desktop.

I am going to copy that path and paste that in and \Northwind.accdb. I am going to click the Test Connection button and it says test connection succeeded. Once they do that, it's going to allow me to click on Next through, to select then where I'm going to put it. In this case, I might decide to create a new database or I could put it in the old Two Trees Test. I got the same screen I got with an Excel import that I can select from one or more tables or views.

And if I do that, it will give me the screen here where I can choose just individual pieces of this Access database or the entire thing, with each one then breaking down into the mappings that it's going to do. Now, if you're looking in this with the idea that you are going to check everything and bring in the entire Access database, you can do it this way. I just wouldn't advise it. I'll show you the way that you do it after that. So if I just said I'm going to bring in one piece of information, which is the Products table, just unchecking that, select Products, click Next.

It just gives us the same idea that it's going to create a SQL Server Integration Services package and it's copied across 45 rows. So that's just one thing. If, on the other hand, what you are wanting to do is take the entire Access database, this is the way I would advise it. In 2007 or 2010, open up Access and get into your system however it is you need to do it. You want to close down any object you have open and simply select from your Database Tools, where you have this upsizing wizard, a way of migrating some or all of your database into SQL Server.

So this way you are doing a push and what it is going to step you through is the whole process. Would you like to use an existing database or create a new one? I am going to say create a new one. It's asking the same kind of information that we have to give when we are connecting to the SQL Server ourselves. What machine is it? Well we are using the phrase "local," which is fine. A dot would work as well. It's going to ask, do I have a login ID and password? Well, no, I don't. I'm logged in right now as the administrator. So I am going to tell it to use the current connection, the trusted connection. It's going to then say if you want to make a new database, what you want to call it? We will say NorthwindSQL. I will click Next.

Which tables do you want? Let's just say all of them. Click two arrows, then Next. Then also asking, what do I want to upsize? Do I want to copy across my indexes or my validation rules? Or my default values and table relationships. In fact, I am going to take all of them. I am going to leave the other options in the default. Click Next. It's going to give me the option to kind of separate the data parts from the Access front end. I'm not going to do any of them. I just want to take all the data and move it up into SQL Server.

So I will click Next. It says it has all the information it needs. Then click Finish. This may take a few minutes depending on the size of your database. But when it finally comes back, it will even give you this Upsizing Wizard Report and tell you the details of what it's actually taken and uploaded. Information about how it's mapped the different fields across here, so you can actually page through that. Certainly, something that you will often have to do is a little bit of revisiting the table design once you get in into SQL Server.

So don't imagine that everything is going to work perfectly. I didn't get any errors on this because it was a fairly vanilla database of the basic Northwind sample. But what I would like to do is certainly go and check and see if it's in SQL Server correctly. And I expect so. The database was called NorthwindSQL. That looks like it's there. I can even start using the regular database diagramming tools once I've provisioned them. I can say, for example, create a new database diagram. And I'm going to add just several tables on the top of it.

The reason I am doing this is just to show that you can tell the database design has mapped across correctly and even as we start to look at them, things like the relationships have started to be copied across as well into parts of this. Of course, you're going to take some time and verify that everything seems to work. But it's looking pretty good right now. So your real decision most of the time is when you're bringing in information from Access, are you just bringing in a table here or there? In which case, using the Import/Export Wizard is just fine.

If you're trying to migrate the entire database, I do it more of a push from the Microsoft Access side.

Show transcript

This video is part of

Image for SQL Server 2008 Essential Training
SQL Server 2008 Essential Training

74 video lessons · 36350 viewers

Simon Allardice
Author

 
Expand all | Collapse all
  1. 2m 21s
    1. Welcome
      1m 19s
    2. Using the exercise files
      1m 2s
  2. 17m 58s
    1. SQL Server core concepts
      9m 4s
    2. SQL Server editions
      3m 8s
    3. Applications included with SQL Server
      5m 46s
  3. 26m 1s
    1. Preparing for installation
      3m 44s
    2. Creating service accounts
      2m 33s
    3. Installing SQL Server
      11m 42s
    4. Post-installation checks
      3m 9s
    5. Installing sample databases
      4m 53s
  4. 13m 35s
    1. Introduction to SQL Server Management Studio
      8m 7s
    2. Introduction to SQL Server Books Online
      3m 6s
    3. SQL Server system databases
      2m 22s
  5. 1h 26m
    1. Planning your database
      9m 39s
    2. Creating a SQL Server database
      4m 7s
    3. Creating tables
      7m 51s
    4. Data types in SQL Server
      12m 25s
    5. Defining keys
      8m 9s
    6. Creating default values
      4m 39s
    7. Creating check constraints
      2m 25s
    8. Creating unique constraints
      4m 34s
    9. Introduction to relationships and foreign keys
      9m 51s
    10. Creating relationships in SQL Server Management Studio
      8m 14s
    11. Database normalization
      11m 47s
    12. Creating computed columns
      3m 10s
  6. 23m 11s
    1. Using the SQL Server Import and Export Wizard
      3m 58s
    2. Importing Excel files into SQL Server
      6m 11s
    3. Importing CSV files into SQL Server
      5m 27s
    4. Importing Access databases into SQL Server
      7m 35s
  7. 55m 29s
    1. Introduction to Transact-SQL
      3m 43s
    2. Using SELECT statements
      7m 16s
    3. Changing the default database
      2m 21s
    4. Creating conditions in SQL
      8m 10s
    5. Sorting your output
      3m 23s
    6. Using aggregate functions
      7m 12s
    7. Finding unique values
      2m 14s
    8. Joining multiple tables together
      8m 0s
    9. Using subqueries
      9m 33s
    10. Viewing execution plans
      3m 37s
  8. 19m 36s
    1. Writing INSERT statements
      5m 47s
    2. Writing UPDATE statements
      4m 38s
    3. Writing DELETE statements
      2m 54s
    4. Using the OUTPUT clause to return inserted keys and GUIDs
      6m 17s
  9. 32m 52s
    1. Introduction to SQL functions
      6m 26s
    2. Using SQL configuration functions
      2m 14s
    3. Using string functions
      7m 26s
    4. Using date functions
      6m 27s
    5. Creating user-defined functions
      10m 19s
  10. 28m 46s
    1. Introduction to stored procedures
      4m 23s
    2. Creating stored procedures
      11m 23s
    3. Introducing transactions
      4m 23s
    4. Creating transactions
      8m 37s
  11. 16m 39s
    1. Understanding and creating indexes
      6m 32s
    2. Monitoring and rebuilding indexes
      6m 0s
    3. Monitoring database size and integrity
      4m 7s
  12. 11m 41s
    1. Creating backups
      4m 21s
    2. Creating differential backups and using backup compression
      3m 40s
    3. Restoring databases
      3m 40s
  13. 17m 40s
    1. Introduction to SQL Server security and permissions
      5m 54s
    2. Adding a Windows user to the database
      5m 7s
    3. Creating SQL Server logins and switching authentication modes
      6m 39s
  14. 36m 41s
    1. Introduction to SQL Server Reporting Services
      2m 52s
    2. Connecting to the Report Manager
      4m 29s
    3. Using Report Builder
      12m 4s
    4. Formatting values in reports
      4m 17s
    5. Adding indicators to reports
      5m 11s
    6. Adding charts to reports
      3m 54s
    7. Working with report security
      3m 54s
  15. 24m 41s
    1. Introduction to SQL Server Integration Services (SSIS)
      1m 57s
    2. Using Business Intelligence Development Studio (BIDS)
      6m 59s
    3. Creating and executing a simple SSIS package
      7m 35s
    4. Importing packages into SQL Server Management Studio
      3m 21s
    5. Scheduling jobs with SQL Server Agent
      4m 49s
  16. 31s
    1. Goodbye
      31s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed SQL Server 2008 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.