Microsoft KB Archive/330468

= How to use the Upsizing wizard in Access 2002 =

Article ID: 330468

Article Last Modified on 5/8/2007

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q330468



Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

For a Microsoft Access 2000 version of this article, see 325017.

IN THIS TASK
 SUMMARY

Introduction

What to Check Before You Upsize

Database Design Considerations

Troubleshooting Upsize Issues

 REFERENCES



SUMMARY
This article describes how to upsize a Microsoft Access database to the Microsoft SQL Server or to the Microsoft Data Engine (MSDE) by using the Access 2002 Upsizing Wizard. This article introduces the Upsizing Wizard, what to check before you upsize, design considerations, suggested troubleshooting techniques for common upsizing issues, and additional resources for information.

back to the top

Introduction
You can use the Upsizing Wizard to convert an existing Access database (.mdb) to a client/server solution. The Upsizing Wizard creates a new SQL Server database structure (including indexes, validation rules, defaults, and relationships) and then copies your data to the new SQL Server database. Additionally, the Upsizing Wizard tries to re-create your queries as SQL Server views and as stored procedures when you create a new client server application.

You can select to upsize only your database structure and your data, or, after you create the SQL Server back end database, you can select to create an Access front end client application. The Upsizing Wizard can create the front end client application in either of two ways:


 * Keep the current Access database file (.mdb) and then add linked tables that connect to the upsized tables on the SQL Server.

Your existing forms, reports, and data access pages use the newly linked tables as their data sources.
 * Create a new Access project file (.adp) and then copy the forms, the reports, the data access pages, the macros, and the modules from the current Access database, and then connect that Access project file to the upsized tables on the SQL Server.

The copied forms, reports, and data access pages that refer to the local database are converted to use the newly upsized SQL Server tables, views, and stored procedures as their data sources through the connection of the ADP file to the server. Data access pages that refer to databases other than the current database are unchanged after upsizing.

Note that when you run the Upsizing Wizard, the process is not perfect. There are differences and potential incompatibilities between Access databases and SQL Server databases. Included are differences in SQL dialects and data types. Although the Wizard can handle many of these differences and still convert objects correctly, the Wizard cannot handle all differences. Therefore, you may experience problems while you create your new database and your new client application. If the Upsizing Wizard experiences a problem during the upsizing process, the Wizard does not stop the process. The Wizard records the error and then continues to work with the next object. After the upsizing process is complete, the Wizard displays a report. The report shows you the details of the process that include the name and the size of the new database, the selections that you made while you ran the Wizard, and any errors the Wizard experienced.

For more information about how to run the Upsizing Wizard, follow these steps:
 * 1) Click Microsoft Access Help on the Help menu.
 * 2) Type Upsizing Wizard in the Office Assistant or in the Answer Wizard.
 * 3) Click Search to view the topics that are returned.

For more information about differences between Access syntax and SQL Server syntax and how the Upsizing Wizard handles these differences, follow these steps:
 * 1) Click Microsoft Access Help on the Help menu.
 * 2) Type Comparison of Microsoft Access and SQL Server syntax in the Office Assistant or in the Answer Wizard.
 * 3) Click Search to view the Comparison of functions between Visual Basic for Applications and SQL Server Transact-SQL subtopic.

back to the top

What to Check Before You Upsize
 Make sure that you have a backup copy of your Access database file (.mdb). The method that you select to upsize may change your existing application design. Make sure that you know the name of the SQL Server or the computer that runs MSDE that you will connect to. Make sure that you know the logon information. For additional information about how to install MSDE, visit the &quot;Installing, Starting, and Stopping MSDE 2000&quot; section of the MSDN Web site:

Using Microsoft Access 2002 with MSDE 2000

 To make upsizing go as smoothly as possible, make sure that you have the appropriate access permissions on the SQL Server you want to upsize on. At minimum, you must have CREATE TABLE permission. If you want to build a new database from scratch, you must have CREATE DATABASE permission. To make sure that you have enough free space, calculate how much disk space upsizing will require by multiplying the size of your Microsoft Access database by two.</li></ul>

back to the top

Database Design Considerations
 You must follow server-based naming restrictions from the beginning. The Upsizing Wizard can correct many common mistakes, but not all mistakes. To make sure there is an easy migration to the back end, follow the SQL Server restrictions:  For SQL Server 6.5, names must be 30 characters or less. For SQL Server 7.0, this limit is expanded to a maximum of 128 characters. For SQL Server 2000, the limit is expanded to 249 characters.</li> The first character must be a letter or the &quot;at&quot; sign (@). The remaining characters may be numbers, letters, the dollar sign ($), the number sign (#), or the underscore (_).</li> For SQL Server 6.5, no spaces are permitted. For SQL Server 7.0, spaces are permitted, but the name must be enclosed by quotation marks (&quot;&quot;) or by square brackets ([]).</li> The name must not be a Transact-SQL keyword. SQL Server reserves both the uppercase and the lowercase versions of keywords. For information about Transact-SQL keywords, see the SQL Server Books Online.</li></ul> </li> The Upsizing Wizard does not convert certain items. Other items are converted, but require verification after the Wizard has completed. When you use the Upsizing Wizard, you must review all changes made to tables, to views, to forms, and to reports.

Specifically, the Upsizing Wizard uses the following rules when databases are converted:  Duplicate column names are given an alias.</li> Date delimiters are converted.</li> Boolean constants are converted to integers.</li> String concatenation is converted from an ampersand (&) to a plus sign (+).</li> Wildcard characters are converted to their appropriate Transact-SQL equivalents.</li> WITH TIES is added to all TOP queries that contain an ORDER BY clause.</li></ul>

The following Access SQL syntax elements are not supported by MSDE and are not converted. The Upsizing Wizard removes these items from SQL statements: <ul> <li>DROP INDEX</li> <li>DISTINCTROW</li> <li>OWNERACCESS</li> <li>Table in UNION</li> <li>ORDER BY in Unions</li> <li>TRANSFORM</li> <li>PARAMETERS</li></ul> </li> <li>The Upsizing Wizard does not convert your code of the Access solution. Code that works directly with Access objects may continue to work, but you must convert any Data Access Objects (DAO) code that works with tables and with queries to ActiveX Data Objects (ADO) code.

For an overview of using ADO, visit the following MSDN Web site:

Working with the Data Access Components of an Office Solution

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odeopg/html/deovrworkingwithdataaccesscomponentsofofficesolution.asp

For additional references about how you can use ADO, visit the following MSDN Web site:

Programming in Access Client/Server Solutions

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odeopg/html/deovrprogramminginaccessclientserversolutions.asp

</li></ul>

back to the top

Troubleshooting Upsize Issues
<ul> <li>Tables do not upsize. <ul> <li>Make sure that the default data file size for the Model database on the SQL Server is not larger than 1 MB.</li> <li>Try to upsize just the table structure.</li></ul> </li> <li>Tables Unexpectedly Upsized to SQL Master Database. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

281950 ACC2002: Database Unexpectedly Upsized to SQL Server Master Database

</li></ul>

back to the top

<div class="references_section">