10+ tips for upsizing an Access database to SQL Server



Similar documents
MS ACCESS DATABASE DATA TYPES

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt

Using SQL Server Management Studio

Creating Database Tables in Microsoft SQL Server

Guide to Upsizing from Access to SQL Server

SQL Server An Overview

ODBC Client Driver Help Kepware, Inc.

Create a New Database in Access 2010

SQL Server Table Design - Best Practices

Exploring Microsoft Office Access Chapter 2: Relational Databases and Multi-Table Queries

Utility Software II lab 1 Jacek Wiślicki, jacenty@kis.p.lodz.pl original material by Hubert Kołodziejski

Databases with Microsoft Access. Using Access to create Databases Jan-Feb 2003

MS Access Lab 2. Topic: Tables

Introduction to Microsoft Jet SQL

Once the schema has been designed, it can be implemented in the RDBMS.

Field Properties Quick Reference

MapInfo SpatialWare Version 4.6 for Microsoft SQL Server

If the database that is required is similar to a template then whole database can be generated by using a template that already exists.

2874CD1EssentialSQL.qxd 6/25/01 3:06 PM Page 1 Essential SQL Copyright 2001 SYBEX, Inc., Alameda, CA

Specifications of Paradox for Windows

PROJECT ON MICROSOFT ACCESS (HOME TAB AND EXTERNAL DATA TAB) SUBMITTED BY: SUBMITTED TO: NAME: ROLL NO: REGN NO: BATCH:

Setting Up ALERE with Client/Server Data

Advantage Database Server

Task 1 : Implement a table in your database to represent the CarModel entity

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro

Ontrack PowerControls V8.1 for SQL ReadMe

3 Data Properties and Validation Rules

Comparison of Open Source RDBMS

Microsoft Access 2007 Introduction

Microsoft Access 3: Understanding and Creating Queries

Databases in Engineering / Lab-1 (MS-Access/SQL)

Instructions. Introduction

Hypercosm. Studio.

Access 2010: Creating Queries Table of Contents INTRODUCTION TO QUERIES... 2 QUERY JOINS... 2 INNER JOINS... 3 OUTER JOINS...

GETTING STARTED GUIDE 4.5. FileAudit VERSION.

Ontrack PowerControls User Guide Version 8.0

Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.

Microsoft Access Glossary of Terms

Connectivity Pack for Microsoft Guide

Field Name Data Type Description Field Size Format

BID2WIN Workshop. Advanced Report Writing

Microsoft Dynamics CRM Security Provider Module

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

Microsoft SQL Server Connector for Apache Hadoop Version 1.0. User Guide

How To Create A Table In Sql (Ahem)

Setting Up Person Accounts

Developing Web Applications for Microsoft SQL Server Databases - What you need to know

Access Part 2 - Design

Microsoft SQL connection to Sysmac NJ Quick Start Guide

Access Queries (Office 2003)

Database Migration from MySQL to RDM Server

Introduction to Python

A Migration Methodology of Transferring Database Structures and Data

Lab Manual. Databases. Microsoft Access. Peeking into Computer Science Access Lab manual

sqlite driver manual

SQL 2012 Compatibility and Vista View Conversion. Presented By: Deepali Savkoor Ellucian June 12, 2014

Chapter 5. Microsoft Access

Migrating to Azure SQL Database

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior.

Microsoft Access Basics

Revealing the Secrets of Microsoft Project

Database Database Management System (DBMS)

Migration Manager v6. User Guide. Version

Creating a Database in Access

Windows Server 2003 Migration OVERVIEW

Database Query 1: SQL Basics

GETTING STARTED GUIDE. FileAudit VERSION.

Using Microsoft Access

not at all a manual simply a quick how-to-do guide

How To Understand The Basic Concepts Of A Database And Data Science

How to set up a database in Microsoft Access

Data Warehousing With Microsoft Access

SQL. Short introduction

What is a database? The parts of an Access database

Introduction to SQL for Data Scientists

Deployment Guide. Cartagena as. Cartagena ERP Integration 3.0 for Microsoft Dynamics CRM. Knut Eivind Handeland

Financial Data Access with SQL, Excel & VBA

Using SQL Queries in Crystal Reports

Creating a Database using Access 2007

X1 Professional Client

Getting FileMaker Server 11 and IIS 7.x to Work with SSL. By Todd Duell

Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design

Setting up a basic database in Access 2007

ODBC Driver Version 4 Manual

NEOAUG. Custom Web ADI Integrators

What s New with Salesforce for Outlook?

Importing from Tab-Delimited Files

IT2305 Database Systems I (Compulsory)

Creating QBE Queries in Microsoft SQL Server

University of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python

Microsoft. Access HOW TO GET STARTED WITH

Jet Data Manager 2012 User Guide

Using the Query Analyzer

Setting Up Person Accounts

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc.

Table of Contents SQL Server Option

Conventional Files versus the Database. Files versus Database. Pros and Cons of Conventional Files. Pros and Cons of Databases. Fields (continued)

Microsoft Access Introduction

FmPro Migrator - FileMaker to SQL Server

V16 Pro - What s New?

Transcription:

10 Things 10+ tips for upsizing an Access database to SQL Server Page 1 By Susan Harkins July 31, 2008, 8:03 AM PDT Takeaway: When the time comes to migrate your Access database to SQL Server, you could be in for a bumpy ride. These suggestions will help you sidestep problems or at least wrestle them into submission. When the time comes to migrate your Access database to SQL Server, you could be in for a bumpy ride. These suggestions will help you sidestep problems or at least wrestle them into submission. There are a number of reasons to upsize an Access database to SQL Server, but the process requires a bit of coaxing. The truth is, upsizing can be a real pain. Access and SQL Server are similar, but they re not compatible. The good news is that you can take steps to limit problems. At the very least, you should be able to identify problems so you can resolve them. Note: This information is also available as a PDF download(http://downloads.techrepublic.com.com/abstract.aspx? docid=378663). #1: If at first you don t succeed Regardless of how well you prepare for the transition from Access to SQL Server, there s no silver bullet for the process. If you re lucky, the data will migrate without any problems. Most likely, the data won t transfer cleanly the first time, or even the second or third time. Don t be frustrated. Instead, figure out why the data didn t transfer, fix the problem, and try again. #2: The SQL Server Migration Assistant Wizard for Access (SSMA) Access comes with an Upsizing Wizard. To launch it, open the Access database and choose Database Utilities from the Tools menu. Then, select Upsizing Wizard. The process isn t painless, but the wizard will hold your hand while it hurts. That wizard works, but not as well as SQL Server Migration Assistant Wizard for Access(http://www.microsoft.com/ downloads/details.aspx?familyid=d842f8b4-c914-4ac7-b2f3-d25fff4e24fb&displaylang=en). You can override many of the SSMA s decisions, and the Assessment Report is invaluable for resolving migration problems. #3: Mapping data types It s a good idea to know what SQL Server will do with your Access data types. During the conversion process, SSMA handles data type incompatibilities for you (for the most part). Table A lists the default type mapping for migrating from Jet 3.5 or Jet 4.0 to SQL Server 2005. Most of them will be exactly what you want, but there might be a few that you have to redefine, which SSMA allows you to do.

Table A: Data type mapping Page 2 Jet 3.5 and 4.0 SQL Server 2005 TEXT(size) MEMO BYTE INTEGER LONG INTEGER SINGLE DOUBLE DECIMAL GUID DATE CURRENCY YES/NO LONGBINARY BINARY(size) nvarchar(size)varchar(size)* nvarchar(max)varchar(max)* tinyint smallint integer real float float uniqueidentifier datetime money bit, tinyint varbinary(max) varbinary(size) *Jet 3.5 #4: Dealing with index incompatibilities For the most part, SSMA converts indexes successfully, but there are a few exceptions:

Page 3 SQL Server s nvarchar and varchar columns don t support indexing. If an Access MEMO field has an index, SSMA will ignore it. You ll just have to do without it in SQL Server. The SSMA will add an identity column to any table that doesn t have at least one unique index or a primary key. The Upsizing Wizard that comes with Access may fail to upsize the table at all. If this happens, simply add an AutoNumber field to the table before upsizing. SQL Server doesn t allow multiple NULL values in a column with a unique index. Any Access table with multiple NULL values with a unique index won t upsize. There s no workaround for this, short of removing the unique index or the multiple NULL values from the Access table before upsizing. #5: Preparing expressions Expressions create special problems for upsizing because a lot of characters and practices simply aren t compatible. SSMA does its best but often fails. You can help by preparing expressions as follows: Replace double quotation mark characters ( ) with single quotation characters ( ). Double embedded single quotation characters. For instance, O Hara becomes O Hara the middle is two single quotation characters, not one double quotation character. Replace the pound sign date delimiter character (#) with single quotation characters. Replace the ampersand character (&) with the + character for concatenation. #6: Preparing object names Access lets you use space characters in object names. SQL Sever will accommodate these names as long as you enclose each instance in square brackets. For instance, Last Name must become [Last Name]. Access actually takes care of most of this for you. SQL statements are the one area you ll have to clean up before upsizing. SQL Server can handle Access objects that are named using SQL Server keywords or that include special characters if you enclose the object name in quotation marks. Unless you know all the keywords, this one can be hard to predict and manage. SSMA encloses these names in square brackets ([ ]). You can easily avoid this problem by avoiding space and other special characters and keywords when naming Access objects. #7: Dealing with Required property in primary key columns An Access primary key can include columns where the Required setting is set to False meaning that the field could remain empty. SQL Server doesn t support this configuration. SSMA usurps the Access setting by assigning the NOT NULL attribute to all columns in the primary key. However, you can avert this behavior as follows: Choose not to upsize the table. Upsize the table as is, despite the incompatibility. I don t have a recommendation on this. Just be sure you have a good reason for ignoring SQL Server s requirements. You will have to deal with it eventually. #8: Dealing with unsupported dates SQL Server s datetime data type is more limited than Access. SQL Server supports dates from January 1, 1753, to December 31, 9999. Access supports dates from January 1, 100, to December 31, 9999. SSMA migrates Access tables with out-ofbound dates, but it converts those unsupported dates to its nearest limit. (The Upsizing Wizard won t upsize the table at all.) There s no work around short of deleting unsupported dates or storing dates as text values and using complex expressions to manipulate them as date values. To find unsupported dates in Access before upsizing, run a query using the following expression: date < #1 1 1753# OR date > #12 31 9999#

#9: What to do with all that SQL? Page 4 The SSMA converts SQL statements into Transact-SQL (T-SQL) views. What it doesn t convert, you ll have to rewrite. There are at least two SQL incompatibilities you should know about: T-SQL doesn t have an equivalent for Jet SQL s DistinctRow. T-SQL doesn t support an alias in the same statement in which it s defined. #10: What s this? Not everything converts as you might expect. In other words, you might not find properties, expressions, or attributes where you expect them. The following list will help you find things that seem misplaced at first: If the Allow Zero Length property is set to False in a TEXT or MEMO column, SSMA applies it to a check constraint on the SQL Server column. SQL Server doesn t support a key link between a TEXT and MEMO columns of different sizes. SQL Server maps both columns to the largest type to compensate. SQL Server enters a 0 value for any NULL values in an Access Yes/No field. MMSA converts a Hyperlink column to a text column, which means they lose their functionality. Validation Rules are converted to table constraints. #11: Where d it go? The SSMA does what it can with incompatibilities. However, there are a few things that just don t translate, as there s nothing in SQL Server to help. When this happens, you ll have to rethink your strategy or write a stored procedure. You ll find no SQL Server equivalent for the following: Format() function StrConv() function Switch() function Choose() function Domain aggregate functions Val() function DateValue() and TimeValue functions Time() and TimeSerial() functions WeekDayName() function DateAddW() function First() and Last() function #12: Outwitting stubborn tables If SSMA can t upsize a table and you can t determine the reason, use SQL Server s Management Studio to import the table. You might get lucky. If not, Management Studio will probably give you more direct and helpful information regarding its failure. #13: Dealing with lots of data Transferring hundreds of thousands of records to SQL Server can take a long time. If that becomes a problem, empty the Access tables and upsize the shell. Then, use queries or copy the Access data into the newly upsized SQL Server database.

Page 5 People who read this... 10+ reasons why IT pros hate Microsoft Access (but really shouldn't)(http://blogs.techrepublic.com.com/10things/? p=386&tag=rbxccnbtr1) 10+ reasons to use Access (and a few reasons not to)(http://blogs.techrepublic.com.com/10things/? p=401&tag=rbxccnbtr1) 10 ways to prevent Access database corruption(http://blogs.techrepublic.com.com/10things/?p=331&tag=rbxccnbtr1) About Susan Harkins Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.