Installing SQL Server Mobile

SQL Server 2005 Mobile Edition Books Online
Installing SQL Server Mobile |
 | See Also

Typically, Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) is implemented as part of an application in which data is distributed between Microsoft SQL Server on the desktop computer and SQL Server Mobile on the supported devices. However, SQL Server Mobile can also be used as a stand-alone database for personal information management (PIM) tools or other applications on the supported devices.

SQL Server Mobile is available in three ways:

  • Integrated with SQL Server 2005.

  • Integrated with Microsoft Visual Studio 2005.

  • As a download from the Microsoft Web site.

    For more information about downloading SQL Server Mobile from the Web, see Microsoft SQL Server 2005 Mobile Edition HomeMicrosoft SQL Server 2005 Mobile Edition Home.

Note:
SQL Server Mobile installation works only on the main memory of a device. If an attempt is made to install SQL Server Mobile on SD/CF card, then SQL Server Mobile installation does not work.

This section describes how to install SQL Server Mobile and its various components.

Topic | Description
Hardware and Software Requirements | Lists hardware and software requirements for each system used with SQL Server Mobile.
Installing Prerequisite Software | Describes the prerequisite software and tells how to install and configure the software used with SQL Server Mobile.
Installing a Development Environment | Describes the software to be installed to form a development environment.
Installing a Server Environment | Describes the different types of SQL Server Mobile server environments and the software required for exchanging data with SQL Server.
Installing and Deploying SQL Server Mobile on a Device | Describes installing SQL Server Mobile on a smart device.
Installation Summary | Provides a complete summary of the installations and configurations that you have to enable exchange of data between SQL Server and SQL Server Mobile.
Upgrading from Earlier Versions of SQL Server CE | Provides information about upgrading from Microsoft SQL Server 2000 Windows CE Edition (SQL Server CE) 1.0, SQL Server CE 1.1, and SQL Server CE 2.0 to SQL Server Mobile.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Hardware and Software Requirements

Hardware and Software Requirements |
 | See Also
Installing SQL Server Mobile >

This topic covers the hardware and software requirements for Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile).

System Requirements

The following table lists the hardware and software requirements for the three SQL Server Mobile environments: development, client, and server environment. For more information about the different environments, see SQL Server Mobile Architecture and Installing SQL Server Mobile.

Environment Requirements

Development environment
  • Microsoft Visual Studio 2005

  • One of the following operating systems:

    Microsoft Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional, Windows XP Tablet PC Edition, Windows 2000 Professional SP4 or later versions, Windows 2000 Server SP4 or later versions

    For information about hardware requirements, see Visual Studio 2005 Books Online.

  • Microsoft Internet Explorer 6.0 or later versions

    Required to access SQL Server Mobile Books Online

  • Microsoft ActiveSync 4.0 or later versions

    Required to debug and deploy applications

Client environment
  • Any device that runs Microsoft Windows CE 5.0, Microsoft Windows XP Tablet PC Edition, Microsoft Mobile Pocket PC 2003, Microsoft Mobile Version 5.0 Pocket PC, or Microsoft Mobile Version 5.0 Smart Phone.

  • Between 2 MB and 3 MB of available storage space, depending on processor type and components installed.

Server environment¹
  • Microsoft SQL Server 2000 SP3a or later versions

  • SQL Server 2005

    Intel or compatible Pentium 600 MHz or greater processor (recommended processor speed is1 GHz or greater), 256 MB RAM minimum (recommended RAM 512 MB or more), hard disk space 250 MB

    For information about operating system requirements, see "Hardware and Software Requirements for Installing SQL Server 2005" in SQL Server 2005 Books Online.

  • IIS

    Supported on Windows Server 2003, Windows 2000 SP4 or later versions, and Windows XP

    120 MB of available disk space on the server

  • Microsoft ActiveSync 4.0 or later versions

    Required when you use SQL Server 2005 Management Studio to manage SQL Server Mobile databases on connected devices.

  • Microsoft Internet Explorer 6.0 or later versions

    Note:
    Microsoft Outlook 98 or a later version is required for synchronization of e-mail, calendar, contacts, tasks, and notes to the desktop or portable computer. (Outlook 2003 recommended)

¹ Server environment can be set up either on one computer (single server environment) or multiple computers (multiple server environment). For more information, see Installing a Server Environment.

SQL Server Replication Components Requirements

In a multiple-server environment, to exchange data between SQL Server Mobile and SQL Server, you have to install replication components on the computer that is running IIS. The following table lists how to install the replication components on two different versions of SQL Server.

SQL Server version Required replication components on the computer that is running IIS

SQL Server 2005

Install the SQL Server 2005 replication components from the SQL Server 2005 product CD.

SQL Server 2000 SP3a or later versions

Install the SQL Server 2000 replication components (sql2kensp3a.msi) from one of the two locations:

  • Microsoft Visual Studio 2005. From Windows Explorer, locate drive:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0 and run the sql2kensp3a.msi file.

  • Web. For information about how to install replication components from the Web, see Microsoft SQL Server 2005 Mobile Edition Home Page.

See Also

Concepts

Installing a Development Environment
Installing a Server Environment
Installing and Deploying SQL Server Mobile on a Device
Single Server Environment
Multiple Server Environment

Other Resources

How to: Install SQL Server Replication Components


Installing Prerequisite Software

Installing Prerequisite Software |
 | See Also
Installing SQL Server Mobile >

Before installing Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) components, you must install the following software on your desktop computer.

Prerequisite Software

The following is the list of prerequisite software:

  • Microsoft Windows 2000 SP4 or later, Microsoft Windows XP Professional SP1 or later, or Microsoft Windows Server 2003 should be the operating system for the development computer and the computer that is running IIS if data exchange with SQL Server is planned.

    If you install Windows XP SP2, to use SQL Server Mobile connectivity, you will have to enable HTTP access. The default setting is to disable HTTP access. To enable HTTP access, do the following:

    1. Open Control Panel.

    2. Click the Windows Firewall icon.

    3. Click Advanced.

    4. Click Settings in the Network Connection Settings area.

    5. Select the Web Server (HTTP) check box.

    6. Click OK to confirm the change.

      Note:
      For more information about how to configure the Windows Firewall, see Microsoft Knowledge Base Article 875356.

  • Microsoft .NET Framework 2.0 or a later version is required on the computer that is running IIS. The .NET Framework is installed with Microsoft Visual Studio 2005 and with SQL Server 2005. To download .NET Framework 2.0 from the Microsoft Web site, see .NET Framework 2.0 Download Center.

  • Microsoft ActiveSync 4.0 or a later version is required in the development, together with the server environment. ActiveSync is available as a free download at ActiveSync Download.

See Also

Concepts

Installing a Development Environment
Installing a Server Environment
Installing and Deploying SQL Server Mobile on a Device
Upgrading from Earlier Versions of SQL Server CE


Installing a Development Environment

Installing a Development Environment |
 | See Also
Installing SQL Server Mobile >

You can develop applications that use Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) by using the Microsoft Visual Studio development environment. Microsoft Visual C++ for Devices (previously known as Microsoft eMbedded Visual C++ 4.0) is part of the Visual Studio 2005 suite.

Note:
Microsoft eMbedded Visual Basic is not supported by SQL Server Mobile.

Visual Studio

Developing with Visual Studio is the easiest way to build and deploy an application that uses SQL Server Mobile. In Visual Studio, you can create a managed application by using C# or Microsoft Visual Basic, and you can create a native application by using the Visual C++ for Devices option.

In a Microsoft .NET Compact Framework application, add a reference to the System.Data.SqlServerCe namespace. The System.Data.SqlServerCe namespace reveals SQL Server Mobile in the .NET Compact Framework. You can then create a database, database tables, and columns, and populate the database with data.

When you build the .NET Compact Framework application that references the System.Data.SqlServerCe namespace and the application is deployed to a smart device or the Pocket PC emulator, Visual Studio automatically checks to see whether the device has the .NET Compact Framework and SQL Server Mobile client components installed. If these components are not detected, they are automatically installed on the device the first time that you deploy an application that references the System.Data.SqlServerCe namespace.

The .NET Compact Framework also includes the System.Data.SqlClient namespace for developing applications that directly access databases in SQL Server 2000 or later versions.

To deploy an application to a smart device, select Start from the Debug menu in Visual Studio 2005. Then, choose whether you want to deploy to a connected smart device or to the Pocket PC emulator. The default installation location on the device is \Windows.

You do not have to install SQL Server Mobile components or the .NET Compact Framework separately on the device if you are deploying an application from within Visual Studio.

Visual Studio File Locations and Descriptions

The following table lists the SQL Server Mobile files, by location, that are installed on the development computer when you use Visual Studio 2005. By default, these files and folders are created in C:\Program Files\Microsoft Visual Studio 8.

Location Contents

\SmartDevices\SDK\SQL Server\Mobile\v3.0\platform\processor

A series of subfolders. Each folder contains:

  • sqlce30.platform.processor.cab

    The sqlce30.platform.processor.cab file contains sqlcese30.dll, sqlceqp30.dll, sqlceme30.dll, System.Data.SqlServerCe.dll.

  • sqlce30.repl. platform.processor.cab

    The sqlce30.repl.platform.processor.cab file contains sqlceca30.dll, sqlceoledb30.dll, and sqlcecompact30.dll.

  • sqlce30.dev.lang.platform.processor.cab The sqlce30.dev.lang.platform.processor.cab file contains isqlw30.exe, a program that implements SQL Server Mobile Query Analyzer, and sqlceerr30lang.dll that provides error descriptions for use during development.

\SmartDevices\SDK\SQL Server\Mobile\v3.0

A folder that contains the SQL Server Mobile Readme (ssmreadme.htm), the SQL Server Mobile Server Tools Setup (sqlce30setup[lang].msi), the SQL Server 2000 replication components (sql2k[lang]sp3a.msi), and the SQL Server Mobile native header files (ssceOleDB30.h, ca_merge30.h, and ssceerr30.h).

\Common7\IDE

A folder that contains SQL Server Mobile Win32 components. These components can be used to create SQL Server Mobile applications which run on the Tablet PC. They can also be used to create applications which run on the desktop; however, these applications can only be used for deployment or testing purposes.

Visual C++ for Devices

Visual C++ for Devices is an option available in Visual Studio that you can use to develop native applications that use SQL Server Mobile.

When you develop a SQL Server Mobile application by using Visual C++ for Devices, create a blank Visual C++ for Devices project and include SQL Server Mobile in the project. To do this, on the Project menu, click Add Files, and then add SsceOleDB.h, ca_mergex30.h, and Ssceerr30.h to your project.

When you develop applications by using Visual C++ for Devices, you must manually copy SQL Server Mobile to the smart device. For more information, see Installing and Deploying SQL Server Mobile on a Device.

See Also

Other Resources

How to: Install SQL Server Mobile on a Device
Building and Deploying Applications (SQL Server Mobile)


Installing a Server Environment

Installing a Server Environment |
 | See Also
Installing SQL Server Mobile >

If a Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) application requires exchanging data between a Microsoft SQL Server database and a SQL Server Mobile database, you must install and configure the following:

  • Microsoft Internet Information Services (IIS)

  • SQL Server 2005 or SQL Server 2000

  • SQL Server Mobile Server Tools (Setup tool)

The following diagram shows a SQL Server Mobile environment in which an application is developed and data is exchanged between SQL Server and SQL Server Mobile.

SQL Server Mobile environment

Types of Server Environments

The SQL Server Mobile environment can be configured as either a single-server or a multiple-server environment. In a single-server environment, all components are on one computer. In a multiple-server environment, IIS and SQL Server are on different computers.

Important:
SQL Server Mobile Server Tools must be installed on the computer that is running IIS.

As shown in the previous illustration, a smart device can connect to:

  • A single-server environment, with IIS and SQL Server running on the same computer.

  • A multiple-server environment, with IIS and SQL Server running on two separate computers.

  • A workstation running a development environment.

A multiple-server environment is the most common scenario for deployed applications. Multiple servers are typically used in production because they provide more flexibility and can better meet complex security needs.

If you are setting up SQL Server Mobile for the first time, consider setting up a single-server environment. This lets you simplify the setup process by installing all the necessary server software on one computer. You can simplify setup even more by combining a single-server environment and a development environment on one computer to create a complete development and test environment. For more information about setting up a single-server environment, see Single Server Environment.

After you have successfully set up a single-server environment, you can easily migrate to a multiple-server environment. For more information about setting up a multiple-server environment, see Multiple Server Environment.

See Also

Other Resources

Configuring and Securing the Server Environment
Configuring the IIS Server Environment
Configuring the SQL Server Environment
Configuring Connectivity Support in IIS
Advanced Security Configurations


Single Server Environment

Single Server Environment |
 | See Also
Installing SQL Server Mobile > Installing a Server Environment >

In a single-server environment, one computer contains the Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) environment. Microsoft SQL Server, Internet Information Services (IIS), and SQL Server 2005 Mobile Edition Server Tools are installed on that computer. Administrator permissions are required on that computer.

Setting Up a Single Server Environment

  1. Install IIS.

  2. Install SQL Server 2005 or SQL Server 2000 SP3 or later.

  3. Install SQL Server Mobile Server Tools.

    When you use SQL Server Mobile, SQL Server Mobile Server Tools is required to use replication or remote data access (RDA). If you have multiple computers that are running IIS in your SQL Server Mobile environment, each computer that is running IIS must have SQL Server Mobile Server Tools installed. Administrator permissions are required on the computer where SQL Server Mobile Server Tools is installed.

Note:
Do not install SQL Server CE Server Tools 2.0 and SQL Server CE Replication Provider 2.0 after installing SQL Server 2005 Mobile Edition Server Tools. This causes synchronization failure.

The following files are added to the desktop after installing SQL Server Mobile Server Tools (sqlce30setupen.msi).

Component | File name
SQL Server Mobile Server Agent | sqlcesa30.dll
SQL Server Mobile Replication Provider | sqlcerp30.dll
Configure Web Synchronization Wizard | connwiz30.exe and supporting files
SQL Server Mobile Books Online | sqlce30.hxs

For more information about how to install SQL Server Mobile Server Tools, see How to: Install SQL Server 2005 Mobile Edition Server Tools.

Note:
If you try to install SQL Server Mobile Server Tools to a directory without read permissions (deny read permissions only), you will receive a warning. If you continue, the tools are installed successfully, but when you uninstall them, you will receive an error, and the files will be neither unregistered nor deleted.

See Also

Other Resources

Managing Connectivity (SQL Server Mobile)
Connectivity Overview
Using Remote Data Access (RDA)
Using Merge Replication


Multiple Server Environment

Multiple Server Environment |
 | See Also
Installing SQL Server Mobile > Installing a Server Environment >

In a multiple-server environment, Microsoft Internet Information Services (IIS) and Microsoft SQL Server are installed on different computers. Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) Server Tools must be installed on the computer that is running IIS.

Note:
Multiple-server environment is the most common scenario for deployed applications.

Setting Up the Computer that is Running SQL Server

Using SQL Server Mobile in a multiple-server environment does not require the installation of any components on the SQL Server system. You only need SQL Server 2000 SP3 or later, or SQL Server 2005 installed on this computer to use remote data access (RDA) or replication with SQL Server Mobile.

Setting Up the Computer that is Running IIS

  1. Install IIS.

  2. Install SQL Server replication components.

    For SQL Server 2005, install the SQL Server 2005 replication components from the SQL Server 2005 product CD. For more information about how to install SQL Server 2005 replication components, see How to: Install SQL Server Replication Components.

    For SQL Server 2000 SP3 or later, install the SQL Server 2000 replication components (sql2kensp3a.msi) from one of the two locations:

    • Microsoft Visual Studio 2005. From Windows Explorer, locate <drive>:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0 and run the sql2kensp3a.msi file.

    • Web. For information about how to install replication components from the Web, see Microsoft SQL Server 2005 Mobile Edition Home.

Note:
The SQL Server replication components are required by SQL Server Mobile Server Tools even if you are using RDA only to exchange data.

  1. Install SQL Server Mobile Server Tools (sqlce30setupen.msi) from one of the three locations:

    • Microsoft Visual Studio 2005. From Windows Explorer, locate <drive>:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0 and run the sqlce30setupen.msi file.

    • Microsoft SQL Server 2005. From Windows Explorer, locate <drive>:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE and run Sqlce30setupen.msi.

    • Web. For information about how to install SQL Server Mobile Server Tools from the Web, see Microsoft SQL Server 2005 Mobile Edition Home.

See Also

Other Resources

Managing Connectivity (SQL Server Mobile)
Connectivity Overview
Using Remote Data Access (RDA)
Using Merge Replication
How to: Install SQL Server Replication Components
How to: Install SQL Server 2005 Mobile Edition Server Tools


Installing and Deploying SQL Server Mobile on a Device

Installing and Deploying SQL Server Mobile on a Device |
 | See Also
Installing SQL Server Mobile >

Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) is installed automatically on the smart device when deploying a managed application created in Microsoft Visual Studio 2005. If you create a native application in Visual Studio 2005 by using Visual C++ for Devices, you must manually copy the files that install SQL Server Mobile on a smart device.

Installing SQL Server Mobile When Deploying a Managed Application

When you build a managed application that references the System.Data.SqlServerCe namespace, and the application is deployed to a smart device or the Pocket PC emulator, Visual Studio automatically checks to see whether the device has the Microsoft .NET Compact Framework and SQL Server Mobile client components installed. If these components are not detected, they are automatically installed on the device the first time that you deploy an application that references the System.Data.SqlServerCe namespace.

To deploy an application to a smart device, click Start on the Debug menu in Visual Studio. Then, choose whether to deploy to a connected smart device or to the Pocket PC emulator. The default installation location on the device is \Windows.

Installing SQL Server Mobile When Deploying a Native Application

SQL Server Mobile and SQL Server Mobile Query Analyzer are installed automatically if you are using Visual Studio 2005 with a smart device project. They require manual installation if you are developing a native application by using Visual C++ for Devices.

You must manually copy SQL Server Mobile and SQL Server Mobile Query Analyzer to the device by copying and extracting the following .cab files from \Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\platform\processor to the root directory of the device: sqlce30.platform.processor.cab and sqlce30.dev.language.platform.processor.cab. If your application uses merge replication or remote data access, you also must install sqlce30.repl.platform.processor.cab. A shortcut to SQL Server Mobile Query Analyzer appears on the Start menu of the device.

To start SQL Server Mobile Query Analyzer, either click the application name on the Start menu or tap the icon on the device.

See Also

Concepts

Installing a Development Environment

Other Resources

SQL Server Mobile Query Analyzer
How to: Install SQL Server Mobile Query Analyzer
How to: Install SQL Server Mobile on a Device


Installation Summary

Installation Summary |
 | See Also
Installing SQL Server Mobile >

After installing the prerequisite software for Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile), you must install and configure some or all of the following software or components, depending on how you will use SQL Server Mobile.

If you are Then install For more information, see

Developing an application that uses SQL Server Mobile but does not use Microsoft SQL Server...
  • Microsoft Visual Studio 2005 (which includes the Microsoft .NET Compact Framework)

Installing a Development Environment

Installing and Deploying SQL Server Mobile on a Device

How to: Install SQL Server Mobile on a Device

Developing an application and exchanging data between SQL Server and SQL Server Mobile databases...
  • Visual Studio 2005, including the .NET Compact Framework

  • IIS

  • SQL Server 2000 Service Pack 3a or later, or SQL Server 2005

  • SQL Server replication components

  • SQL Server Mobile Server Tools Setup

Installing a Development Environment

Installing a Server Environment

Single Server Environment

Multiple Server Environment

Configuring and Securing the Server Environment

Configuring the IIS Server Environment

Configuring the SQL Server Environment

Deploying SQL Server Mobile on a device...
  • SQL Server Mobile client components on the device

Installing and Deploying SQL Server Mobile on a Device

How to: Install SQL Server Mobile on a Device

See Also

Concepts

Installing a Development Environment
Installing a Server Environment

Other Resources

Configuring and Securing the Server Environment
How to: Install SQL Server Mobile on a Device


Upgrading from Earlier Versions of SQL Server CE

Upgrading from Earlier Versions of SQL Server CE |
 | See Also
Installing SQL Server Mobile >

Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) maintains two versions of the product side-by-side. The two versions of SQL Server Mobile can coexist on the same computer. This enables a simple and gradual upgrade process. SQL Server Mobile connectivity requires that the client components on the supported devices and the server components installed on the computer that is running Microsoft Internet Information Services (IIS) be the same major-release version.

Upgrading Database Files

You can upgrade a database created with an earlier version of Microsoft SQL Server 2000 Windows CE Edition version 2.0 (SQL Server CE) to a database created with SQL Server Mobile by using the SQL Server Mobile Database Upgrade tool (upgrade.exe). The Database Upgrade tool runs on a smart device.

When you run the SQL Server Mobile Database Upgrade tool, the new SQL Server Mobile database is created on the smart device. The new database, with the file name extension .sdf, contains all the data that was in the source database. You will have to reinitialize the upgraded database to continue using it for replication.

For more information, see How to: Use the SQL Server Mobile Database Upgrade Tool and SQL Server Mobile Database Upgrade Tool.

If, in a SQL Server CE database, a UNIQUE constraint is specified on a column without specifying NULL|NOT NULL attributes, the column is created with a NOT NULL attribute automatically. If you try to upgrade this database to SQL Server Mobile, the same column attributes are copied over. Therefore, you will not be able to insert NULL attributes to this table, even after upgrading to SQL Server Mobile. For more information about NULL|NOT NULL, see ALTER TABLE (SQL Server Mobile).

Important:
If you are using replication or remote data access (RDA) as a connectivity solution before upgrading to SQL Server Mobile, you must synchronize the source SQL Server CE database (subscription database) with the SQL Server database (Publisher). The reason for synchronizing before upgrading to SQL Server Mobile is to ensure that any changes that exist in the tables on the SQL Server CE database are updated on the SQL Server database, because after the upgrade you must re-subscribe or re-pull using the new database.

Upgrading Distributed Applications

When you upgrade, first install SQL Server Mobile Server Tools, and then install the client components. Do not deploy newer client applications if you still have an earlier version of SQL Server CE Server Tools on the computer that is running IIS. After all components are in place, redeploy the application to your smart devices.

Important:
Ensure that the upgraded application is available and functioning correctly before you remove the previous release of your application and the SQL Server CE client components.

During the application upgrade process, you must change any references of SQL Server CE version 1.0, SQL Server CE version 1.1, and SQL Server CE version 2.0 to SQL Server Mobile. When you upgrade the computer that is running IIS, you must install SQL Server Mobile Server Tools. You can then configure a new virtual directory for SQL Server Mobile clients on this computer. As you deploy SQL Server Mobile client components to your devices, you must update your application to use this new virtual directory for SQL Server Mobile by updating the InternetURL property of your replication or RDA objects. The new InternetURL property points to sqlcesa30.dll instead of Sscesa10.dll or Sscesa20.dll. Updating the InternetURL property is critical because the SQL Server Mobile Client Agent can communicate only with the SQL Server Mobile Server Agent.

See Also

Concepts

Installing and Deploying SQL Server Mobile on a Device

Other Resources

Installing SQL Server Mobile
How to: Install SQL Server Mobile on a Device


SQL Server Mobile Database Upgrade Tool

SQL Server Mobile Database Upgrade Tool |
 | See Also
Installing SQL Server Mobile > Upgrading from Earlier Versions of SQL Server CE >

The Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) Database Upgrade tool is a command prompt utility that upgrades a database created with Microsoft SQL Server 2000 Windows CE Edition (SQL Server CE) version 2.0, which is a source database, to the latest version of a SQL Server Mobile database, which is a destination database.

Note:
The file format for SQL Server Mobile is different from earlier versions of SQL Server CE. Therefore, databases created with earlier versions must be upgraded to the new file format to be used with SQL Server Mobile.

How the Database Upgrade Tool Works

When the SQL Server Mobile Database Upgrade tool (upgrade.exe) is run on a smart device, a new SQL Server Mobile database is created. The new SQL Server Mobile database, with the file name extension .sdf, contains all the data that was present in the source database.

The source database from the earlier version of SQL Server CE also remains on the device. Before running the SQL Server Mobile Database Upgrade tool, you must ensure that the device has sufficient memory in both databases. Additionally, the SQL Server Mobile Database Upgrade tool requires approximately 300 KB of memory on the device.

The SQL Server Mobile Database Upgrade tool does not upgrade tracking or subscription information. Only data in the source database is upgraded to a SQL Server Mobile database.

Important:
If you are using replication or remote data access (RDA) as a connectivity solution, you must synchronize the source SQL Server Mobile database with the SQL Server database first, before upgrading the database. Upgrading a connectivity database would only be used to preserve any local tables which might exist in the database, because after the upgrade you will have to re-subscribe or re-pull using the new database.

Location of the Database Upgrade Tool

The database upgrade tool is installed with Microsoft Visual Studio 2005 as part of the SqlMobile30DevTools[lang].msi file. The default location of the file is <drive>:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\[platform]\[processor]\upgrade.exe.

Running the Database Upgrade Tool

To run the Database Upgrade tool, you must have the following software installed on the smart device:

  • SQL Server CE 1.0, SQL Server CE 1.1, or SQL Server CE 2.0

  • SQL Server Mobile and the SQL Server Mobile OLE DB Provider (this is installed by default with the installation of SQL Server Mobile)

When deployed on the smart device where the source database is located, the Database Upgrade tool performs the following tasks:

  • Opens the source database file (with the extension .sdf) that was specified at the command prompt.

  • Opens the specified database. If the SQL Server CE 2.0 OLE DB Provider (ssce20.dll) is not found on the device, the Database Upgrade tool tries to use the SQL Server CE 1.0 and SQL Server CE 1.1 OLE DB Provider (ssce10.dll).

Note:
If neither of the OLE DB providers from earlier versions of SQL Server Mobile is found, the Database Upgrade tool returns the message "SQL Server CE 1.1 or higher must already be installed."

  • Uses the SQL Server Mobile storage engine to create a new SQL Server Mobile database.

  • Reads the schema of the source database using the OLE DB provider of the earlier version of SQL Server Mobile.

  • Writes the schema to the SQL Server Mobile destination database using the SQL Server Mobile OLE DB provider.

  • Reads the data in the source database using the OLE DB provider for the earlier version of SQL Server Mobile.

  • Writes the data to the SQL Server Mobile destination database using the SQL Server Mobile OLE DB Provider.

Note:
The Database Upgrade tool cannot distinguish between an index created by the user and an index created by adding a constraint such as a primary key. The tool will not upgrade indexes that share the same name as the constraint, as the tool assumes that these were created by the constraint itself.

Any errors are written to a log file (upgrade.log), which are saved to the same directory on the device where the Database Upgrade tool (upgrade.exe) is located.

Note:
Upgrade.log is deleted and re-created before each upgrade.

For more information about backward compatibility and upgrading to SQL Server Mobile, see Upgrading from Earlier Versions of SQL Server CE.

To run the Database Upgrade tool, see How to: Use the SQL Server Mobile Database Upgrade Tool. The following table outlines the command-line parameters that are used with the Database Upgrade tool.

Parameter | Description
/s | The path of the source database file. (required)
/sp | The password for the source database file. (optional)
/d | The path of the destination database file. If you specify an existing file, the file will be overwritten. (required)
/dp | The password for the destination database file. (optional)
/e | If specified, the destination database will be encrypted. If you specify the /e parameter, you must also specify /sp and provide a password. (optional)
/q | Perform the upgrade silently without any UI. (optional)
/? | Displays this list of parameters. (optional)

See Also

© 2005 Microsoft Corporation. All rights reserved.


User Interface Reference (SQL Server Mobile)

User Interface Reference (SQL Server Mobile) |
 | See Also

This section contains the context-sensitive help topics for wizards supplied with Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile). Help is also provided for the SQL Server Mobile tools that are made available in SQL Server Management Studio.

In This Section

These topics are available from the user interface by pressing the F1 key or by clicking Help in dialog boxes and wizard pages.

SQL Server 2005 Mobile Edition Server Tools Setup Wizard Help

Configure Web Synchronization Wizard Help

New Subscription Wizard Help

SQL Server Mobile Management Dialog Help in SQL Server Management Studio

See Also

© 2005 Microsoft Corporation. All rights reserved.


SQL Server 2005 Mobile Edition Server Tools Setup Wizard Help

SQL Server 2005 Mobile Edition Server Tools Setup Wizard Help |
 | See Also
User Interface Reference (SQL Server Mobile) >

This section provides information about the following pages of the SQL Server 2005 Mobile Edition Server Tools Setup Wizard:

  • System Configuration Check

  • SQL Server Version

See Also

© 2005 Microsoft Corporation. All rights reserved.


System Configuration Check

System Configuration Check |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server 2005 Mobile Edition Server Tools Setup Wizard Help >

Use the System Configuration Check page to check the computer for potential configuration problems. The computer must have the following software installed prior to SQL Server 2005 Mobile Edition Server Tools setup:

  • Windows 2000 or later

  • Microsoft Internet Information Services (IIS)

  • Microsoft Data Access Components (MDAC) 2.7 or later

  • Microsoft .NET Framework version 2.0 or later

  • SQL Server 2005 Replication components

Note:
For more information about installing replication components, see Hardware and Software Requirements.

  • SQL Server 2000 replication components, if you are synchronizing with SQL Server 2000 SP3 or later

The SQL Server 2005 Mobile Edition Server Tools Setup Wizard checks for each of these requirements sequentially. It does not install any missing software.

While the check is in progress, you can click Cancel to abort the configuration check. You cannot continue the Server Tools setup process if the configuration check has been aborted.

Status/Checks

If one of the required software installations is missing, an error message will be displayed. The configuration check will continue despite any errors until all configuration requirements have been checked. It is possible to have multiple configuration errors during the configuration check. If there is an error, when the configuration check is complete, you will not be allowed to continue SQL Server 2005 Mobile Edition Server Tools Setup and you must close the SQL Server 2005 Mobile Edition Server Tools Setup Wizard, download and install the appropriate requirements, and then restart the wizard.

More

The More button provides options to view more detailed information about actions the configuration check is performing.

See Also

© 2005 Microsoft Corporation. All rights reserved.


SQL Server Version

SQL Server Version |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server 2005 Mobile Edition Server Tools Setup Wizard Help >

If Microsoft SQL Server is installed on the computer that is running Internet Information Services (IIS), SQL Server 2005 Mobile Edition Server Tools Setup will detect which version is installed. To exchange data between SQL Server Mobile and SQL Server, you have to install replication components (either SQL Server 2005 or SQL Server 2000 SP3 or later versions) on the computer that is running IIS. The appropriate selections and check boxes will be available to you depending on which version of SQL Server is detected.

Synchronize With SQL Server 2000

The Synchronize with SQL Server 2000 check box is automatically selected if SQL Server 2000 SP3 replication components are detected on the computer. You will not be able to select or clear this check box manually.

Synchronize With SQL Server 2005

The Synchronize With SQL Server check box is automatically selected if SQL Server replication components are detected on the computer. You will not be able to select or clear this check box manually.

If you do not have SQL Server replication Components installed, you cannot configure SQL Server Mobile for synchronization with SQL Server. For more information, see How to: Install SQL Server Replication Components.

Note If the computer has SQL Server 2005 and SQL Server 2000, both the check boxes will be selected.

See Also

Concepts

Hardware and Software Requirements
Installing a Server Environment


Configure Web Synchronization Wizard Help

Configure Web Synchronization Wizard Help |
 | See Also
User Interface Reference (SQL Server Mobile) >

The Configure Web Synchronization Wizard helps configure a virtual directory in Internet Information Services (IIS) and set the NTFS file system permissions for the directory. This wizard also helps you set file access permissions on folders needed for merge replication.

This section provides information about the following pages of the Configure Web Synchronization Wizard:

  • Subscriber Type

  • Web Server

  • Virtual Directory Information (SQL Server Mobile)

  • Secure Communications

  • Client Authentication

  • Anonymous Access (SQL Server Mobile)

  • Authenticated Access

  • Directory Access (SQL Server Mobile)

  • Snapshot Share Access

  • Complete the Wizard (Configure Web Synchronization Wizard)

See Also

© 2005 Microsoft Corporation. All rights reserved.


Subscriber Type

Subscriber Type |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Subscriber Type page of the Configure Web Synchronization Wizard allows you to select the subscriber that uses virtual directory to establish the exact authentication and authorization policy for each application that requires data access. You can configure the virtual directory for either SQL Server Mobile or SQL Server subscribers. If you want to enable both types of subscribers, you must run this wizard twice and configure the virtual directory for each subscriber type.

Options

SQL Server Mobile Edition

Select the SQL Server Mobile Edition check box to create a virtual directory for SQL Server Mobile to synchronize with SQL Server over HTTP. Selecting this check box also means that you plan to use SQL Server Mobile subscriptions that use SQL Server Mobile Server Agent (Sqlcesa30.dll).

SQL Server

Select the SQL Server check box to create a virtual directory for SQL Server to synchronize with SQL Server over HTTPS. Selecting this checkbox means that you plan to use SQL Server subscribers that use the SQL Server Replication Listener (replisapi.dll).

Important:
SQL Server subscribers require Secure Sockets Layer (SSL). You must have a certificate installed on the server before creating a virtual directory for SQL Server subscribers.

See Also

Other Resources

Configuring Connectivity Support in IIS
How to: Configure Connectivity with the Configure Web Synchronization Wizard
Using the Configure Web Synchronization Wizard


Web Server

Web Server |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Web Server page of the Configure Web Synchronization Wizard allows you to select a Web server, which is essentially the computer running Internet Information Services (IIS). This page also allows you to create a new virtual directory or select and configure an existing virtual directory.

Important:
If you modify the Web server permissions while Configure Web Synchronization Wizard is open, you will need to close and restart the Wizard to see the effect of your changes.

Options

Enter the name of the computer running IIS:

Specify the name of the computer running IIS. You can either specify a local computer running IIS or a remote computer running IIS. By default, the local computer is specified as running IIS.

Create a new virtual directory

Select the Create a new virtual directory radio button and then select a Web site in which to create the new virtual directory. Select the desired Web site to enable the Next button.

Note:
When creating a new virtual directory, you are not limited to Default Web Site. If you want to create a virtual directory in another Web site, you have to ensure that the Web site is created on the IIS computer before you run the Configure Web Synchronization Wizard.

Configure an existing virtual directory

Select the Configure an existing virtual directory radio button if you want to use a pre-existing virtual directory. Select the name of the virtual directory to enable the Next button.

Important If you do not have the SQL Server 2005 Mobile Edition Server Tools installed, you get prompted to install the SQL Server 2005 Mobile Edition Server Tools when you click on one of the radio buttons to create or configure the virtual directory. If you are configuring a local IIS machine (by running the Configure Web Synchronization Wizard from SQL Server Management Studio), you will be prompted to install the Server tools. If you click Yes, the Server Tools will be installed for you. If your IIS machine is remote and the Server Tools are not installed, you will receive a message stating that you need to install the Server Tools on that machine. For more information, see How to: Install SQL Server 2005 Mobile Edition Server Tools

See Also

© 2005 Microsoft Corporation. All rights reserved.


Virtual Directory Information (SQL Server Mobile)

Virtual Directory Information (SQL Server Mobile) |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Virtual Directory Information page of the Configure Web Synchronization Wizard allows you to specify the name and the path for the virtual directory.

Options

Alias:

Specify the name for the virtual directory on the computer running IIS. It is recommended that you use the same naming conventions that you use for a folder.

The name of the server running Microsoft Internet Information Services (IIS) and the virtual directory must be specified as part of the InternetURL property for connectivity. You may optionally specify the SQL Server Mobile Server Agent (Sqlcesa30.dll) for SQL Server Mobile or the SQL Server Replication Listener (replisapi.dll) for SQL Server in the URL. For example, the following URL accesses a SQL Server Mobile Server Agent for replication or remote data access (RDA): http://www.adventure-works.com/sqlce or http://www.adventure-works.com/sqlce/Sqlcesa30.dll

Path:

Specify the path to the content folder that contains the virtual directory. The path to the content folder should be specified as a local path (for example C:\Program Files), even if the computer running IIS is a remote computer. By default, the Configure Web Synchronization Wizard points to the location in which the SQL Server Mobile Server Agent is installed for SQL Server Mobile or to C:\Inetpub\wwwroot for SQL Server. You can also specify an alternate location on disk for better disk space management, although a copy of the SQL Server Mobile Server Agent or SQL Server Replication Listener must be located in that location. If you do specify an alternate location, the Configure Web Synchronization Wizard copies and registers the SQL Server Mobile Server Agent or the SQL Server Replication Listener to the new location. All temporary files for data transfer to and from the instance of Microsoft SQL Server will reside in this location for SQL Server Mobile.

See Also

Reference

Configure Web Synchronization Wizard Help

Other Resources

Configuring Connectivity Support in IIS
How to: Configure Connectivity with the Configure Web Synchronization Wizard


Client Authentication

Client Authentication |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Client Authentication page of the Configure Web Synchronization Wizard lets you specify the type of authentication to be used when a client connects to the server that is running Microsoft Internet Information Services (IIS), also referred to as the Web server.

Options

Clients will connect anonymously. A user name and password will not be required.

Select this option to permit anonymous access to the client. Anonymous access is a type of IIS authentication method that gives client access to your Web site without prompting them for a user name or password. When a user tries to connect to your public Web site, the Web server by default assigns the connection to the Windows user account IUSR_computername, where computername is the name of the computer on which IIS is running.

Clients will be authenticated. A user name and password will be required.

Select this option to enforce authenticated access to the client. Authenticated access is a type of IIS authentication method that forces a client to provide identification credentials, such as a user name and a password, every time the client connects to the Web server. These credentials are validated against some authority, such as a database. If the credentials are valid, the user who submitted the credentials is considered an authenticated identity.

Note:
If you specify Anonymous access and the instances of IIS and Microsoft SQL Server are located on different computers, you must configure the IIS anonymous user account as a domain user account. The default anonymous user computername\IUSR_computername cannot be used because it is a local account for a computer. For more information about these options, see IIS Security.

See Also

Reference

Authenticated Access
Configure Web Synchronization Wizard Help

Other Resources

Configuring Connectivity Support in IIS
How to: Configure Connectivity with the Configure Web Synchronization Wizard


Anonymous Access (SQL Server Mobile)

Anonymous Access (SQL Server Mobile) |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Anonymous Access page of the Configure Web Synchronization Wizard lets you specify the account that will be used to establish anonymous access with the virtual directory that exists on the computer that is running Microsoft Internet Information Services (IIS).

Options

User account

When Anonymous access is selected, the anonymous user (by default, computername\IUSR_computername) is automatically provided the appropriate NTFS file system permissions to the computer that is running IIS. Read and Write access permissions are set on the content folder for SQL Server Mobile and Read & Execute access permission is set on the SQL Server Mobile Server Agent (Sqlcesa30.dll).

You can specify a different anonymous user by clicking Change.

Password and Confirm password

The Password and Confirm Password fields are deactivated as they accept the default credentials of the anonymous user, computername\IUSR_computername.

If you change the user account, you have to specify and confirm a new password.

The virtual directory will be used for SQL Server merge replication with a snapshot share.

If your application uses merge replication and a Universal Naming Convention (UNC) configured snapshot (not FTP configured snapshot only), then NTFS Read permissions on the actual snapshot folder and the share are required.

Select this check box if one or more of the following states exists:

  • A UNC snapshot share has already been created and specified during the configuration of the SQL Server Distributor.

  • The UNC snapshot share has been created and will be specified when the SQL Server Distributor is configured.

Note:
A folder or share cannot be created by using the Configure Web Synchronization Wizard. It must already exist.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Authenticated Access

Authenticated Access |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Authenticated Access page of the Configure Web Synchronization Wizard lets you specify the authentication methods that will be used to validate client credentials.

Options

Integrated Windows Authentication

Integrated Windows Authentication a secure form of authentication because the user name and password are hashed before being sent across the network.

Note:
If you specify Integrated Windows Authentication, you cannot operate over a proxy server or firewall. Therefore, Integrated Windows Authentication can be used for intranet applications, but it is rarely used for Internet applications.

Basic authentication

In Basic authentication, clients are prompted to supply a user name and a password. These details are returned to Microsoft Internet Information Services in an unencrypted form.

Important:
If you specify Basic authentication, we recommend that you always use Secure Sockets Layer (SSL) encryption to avoid transmitting the password of the user across the network in an unencrypted form. For more information, see Configuring SSL Encryption.

Default Domain

To configure IIS server to assume a default logon domain, enter the domain name in the Default domain field.

Realm

A term sometimes used for domain, in this case to refer to user domains established for security reasons, not Internet domains. For password-protected files, the name of the protected resource or area on the server. If you try to access the protected resource while browsing, the name of the realm will appear in the dialog box that asks for a user name and password.

Digest authentication and .NET Passport authentication

Digest authentication and .NET Passport authentication are not supported by SQL Server Mobile applications running on Windows CE-based devices.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Directory Access (SQL Server Mobile)

Directory Access (SQL Server Mobile) |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Directory Access page of the Configure Web Synchronization Wizard lets you specify the client accounts that require access to the virtual directory. The client accounts can be either groups or users.

Options

Groups or user names

After Microsoft Internet Information Services (IIS) authenticates the client, IIS checks whether the client is authorized to start replication or remote data access (RDA). To control which clients can invoke replication or RDA, NTFS file system permissions on the SQL Server Mobile Server Agent in SQL Server Mobile, or SQL Server Replication Listener in SQL Server, content folder and the UNC snapshot share (when you use merge replication) are required. Proper configuration of permissions is very important to prevent unauthorized access to Microsoft SQL Server.

Click Add to include groups and users as the valid client accounts to access SQL Server. The appropriate NTFS permissions are added to the Windows groups or user accounts that are specified.

The virtual directory will be used for SQL Server merge replication with a snapshot share.

If your application uses merge replication and a Universal Naming Convention (UNC) configured snapshot share, not an FTP-configured snapshot share only, NTFS Read permissions on the actual snapshot folder and the share are required.

Select this check box if one or more of the following states exists:

  • A UNC snapshot share has already been created and specified during the configuration of the SQL Server Distributor.

  • The UNC snapshot share has been created and will be specified when the SQL Server Distributor is configured.

Note:
A folder or share cannot be created by using the Configure Web Synchronization Wizard; it must already exist.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Snapshot Share Access

Snapshot Share Access |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Snapshot Share Access page of the Configure Web Synchronization Wizard lets you specify the location of a snapshot folder if you plan to use SQL Server merge replication. The snapshot folder holds the snapshot files that contain the schema and data for published tables.

Options

Share

Specify a Universal Naming Convention (UNC) path for a snapshot share. Administrative shares are not supported. Depending on the virtual directory authentication that is selected, the appropriate Microsoft Windows user accounts require Read permission on the snapshot share. A folder or share cannot be created by using the Configure Web Synchronization Wizard. It must already exist. You can either type the network path of the snapshot share or click Browse to find it.

Important:
If your snapshot is configured for FTP only, this step is not required. Go back to the Anonymous Access page or the Directory Access page, depending on whether you selected anonymous access or authenticated access, and clear the snapshot share check box.

For more information about snapshot folders, see Configuring the Snapshot Folder.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Secure Communications

Secure Communications |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Secure Communications page of the Configure Web Synchronization Wizard configures Secure Sockets Layer (SSL) settings for encrypted communication.

Note:
The Secure Communications page is not displayed if you are configuring the virtual directory for SQL Server Subscribers. SQL Server Subscribers require SSL connections.

Using SSL

When a Web browser supporting secure communications connects to a Web site configured to use SSL (URLs starting with https://), a secure connection protects the data that is being transferred. A client certificate is a digital identification issued by a trusted, third-party organization, referred to as a certification authority. You can configure your Web server to accept, require, or reject client certificates as a way of establishing a connection with a particular file or directory. Users trying to access a site with client certificates can be mapped. Users without client certificates can use other authentication methods. Client certificate mappings match information that is contained in a client's certificate against Windows user account information. A certificate trust list (CTL) is a list of approved certification authorities for a particular Web site. For more information, see Configuring SSL Encryption.

Do Not Require Secure Channel (SSL)

Select this option if you do not require the users to go through the SSL channel.

Require Secure Channel (SSL)

Select this option to configure IIS to require an encrypted communication link for a Web browser to connect. When this option is selected, all data sent to and from this Web site is encrypted using a certificate and users will use the URL https://.

Important:
You must create a new certificate or attach to an existing certificate before you select this option.

Require Client Certificates

Select this check box to permit only users with a valid client certificate to connect. Users without a valid client certificate are denied access to this site.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Complete the Wizard (Configure Web Synchronization Wizard)

Complete the Wizard (Configure Web Synchronization Wizard) |
 | See Also
User Interface Reference (SQL Server Mobile) > Configure Web Synchronization Wizard Help >

The Complete the Wizard page of the Configure Web Synchronization Wizard is the last page of the wizard. This page shows a summary of the actions that the wizard will perform based on the information supplied by the user.

See Also

© 2005 Microsoft Corporation. All rights reserved.


New Subscription Wizard Help

New Subscription Wizard Help |
 | See Also
User Interface Reference (SQL Server Mobile) >

The New Subscription Wizard lets you create a SQL Server 2005 Mobile Edition subscription to a SQL Server publication. The SQL Server Publisher and Distributor must be on the same computer.

This section provides information about the following pages of the New Subscription Wizard:

  • Choose Publication

  • Identify Subscription

  • Web Server Authentication

  • SQL Server Authentication

  • Complete the Wizard

See Also

© 2005 Microsoft Corporation. All rights reserved.


Choose Publication

Choose Publication |
 | See Also
User Interface Reference (SQL Server Mobile) > New Subscription Wizard Help >

The Choose Publication page of the New Subscription Wizard lets you select the publications for which you want to create a SQL Server 2005 Mobile Edition (SQL Server Mobile) subscription.

Options

Publisher

Specify the name of the SQL Server Publisher.

Publication

Select the publication for which you are creating a SQL Server Mobile subscription.

Note:
We recommend that the publication be created before you start the New Subscription Wizard. For more information about creating publications, see "New Publication Wizard" in SQL Server Books Online.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Identify Subscription

Identify Subscription |
 | See Also
User Interface Reference (SQL Server Mobile) > New Subscription Wizard Help >

The Identify Subscription page of the New Subscription Wizard lets you specify the subscription name and an optional HOST_NAME for filtering the subscriptions.

Options

Subscription name

Specify the name of the SQL Server 2005 Mobile Edition subscription.

HOST_NAME for filtering subscriptions (optional)

Set the HOST_NAME() value, if the merge publication is defined with parameterized filters using the HOST_NAME() function to filter data.

For example, suppose your database has a Customers table with a region column, and you want all sales representatives in the Eastern Region to receive only the rows that have "Eastern" in that column. You would define a filter for that table of the form: WHERE region = HOST_NAME(). On this page of the wizard, you set the HOST_NAME() value for each subscription of an Eastern Region sales representative to "Eastern". When the sales representatives synchronize, they receive the appropriate partition of the Customers table.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Web Server Authentication

Web Server Authentication |
 | See Also
User Interface Reference (SQL Server Mobile) > New Subscription Wizard Help >

The Web Server Authentication page of New Subscription Wizard lets you specify the type of authentication to be used when the subscriber connects to the Web server.

Options

URL to SQL Server Mobile Virtual Directory on the Web Server

Specify the path to the virtual directory on the Web server. You must create the SQL Server Mobile virtual directory before you start the New Subscription Wizard. For more information about creating a virtual directory, see Configure Web Synchronization Wizard Help.

The subscriber will connect anonymously. A user name and password will not be required.

Select this option to allow anonymous access to the subscriber. Anonymous access gives access to your Web site without prompting users for a user name or password. When a user attempts to connect to your public Web site, your Web server assigns the connection to the Windows user account IUSR_computername, where computername is the name of the computer on which IIS is running.

The subscriber will be authenticated. A user name and password will be required.

Select this option to enforce authenticated access to the user. Authenticated access forces a user to provide identification credentials, such as a user name and a password, each time the user connects to the Web server. These credentials are validated against some authority, such as a database. If the credentials are valid, the entity that submitted the credentials is considered an authenticated identity.

See Also

© 2005 Microsoft Corporation. All rights reserved.


SQL Server Authentication

SQL Server Authentication |
 | See Also
User Interface Reference (SQL Server Mobile) > New Subscription Wizard Help >

The SQL Server Authentication page of the New Subscription Wizard lets you specify either Windows Authentication or SQL Server Authentication to be used when the SQL Server 2005 Mobile Edition Subscriber connects to SQL Server.

Options

Use Windows Authentication. A SQL Server user name and password are not required.

Select this check box if you want to use Windows Authentication. When Windows Authentication is used to connect to SQL Server, Microsoft Windows is completely responsible for authenticating the client. In this case, the client is identified by its Windows user account.

Use SQL Server Authentication with the following SQL Server user name and password.

Select this check box if you want to use SQL Server Authentication. When SQL Server Authentication is used, SQL Server authenticates the client by comparing the client-supplied user name and password to the list of valid user names and passwords maintained within SQL Server.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Complete the Wizard

Complete the Wizard |
 | See Also
User Interface Reference (SQL Server Mobile) > New Subscription Wizard Help >

The Complete the Wizard page of New Subscription Wizard is the last page of the wizard. This page provides a summary of all the options that were selected to create a new subscription.

Code sample

On this summary page, code samples are provided for both C# and Visual Basic. You can take these samples and use them in your own applications after you make minor modifications. These code samples do not display passwords, and the variable names and error handling might have to be changed.

See Also

© 2005 Microsoft Corporation. All rights reserved.


SQL Server Mobile Management Dialog Help in SQL Server Management Studio

SQL Server Mobile Management Dialog Help in SQL Server Management Studio |
 | See Also
User Interface Reference (SQL Server Mobile) >

This section provides information about the following pages of the SQL Server 2005 Mobile Edition Server Tools Setup Wizard:

  • Subscription Properties

  • Synchronize Subscription

  • New Index

  • Index Properties (SQL Server Mobile)

  • Column Properties

  • Table Properties

  • New Table

  • Edit Table (SQL Server Mobile)

  • Database Properties - General

  • Shrink & Repair

  • Database Properties - Set Password

  • Create Database Dialog (SQL Server Mobile)

  • Delete Objects (SQL Server Mobile)

  • Delete Subscription (SQL Server Mobile)

See Also

© 2005 Microsoft Corporation. All rights reserved.


Subscription Properties

Subscription Properties |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The Subscription Properties page in SQL Server Management Studio enables you to see the properties that are set for a subscription and modify some of those properties

Options

Property Name | Value
Subscriber | The name of the computer or device that has a subscription to the publication. This property can only be set once at the time when the subscription is created.
Publisher | The name of the computer where the publication was created. This property can only be set once at the time when the subscription is created.
PublisherDatabase | The name of the database from which a publication has been created. This property can only be set once at the time when the subscription is created.
Publication | The name of the publication. This property can only be set once at the time when the subscription is created.
HostName | Set the HOST_NAME() value if the merge publication is defined with parameterized filters using the HOST_NAME() function to filter data.
InternetUrl | Displays the SQL Server Mobile virtual directory on the Web server running Internet Information Services (IIS).
Internet Login | If needed for Web server authentication, this field displays the user name needed for login.
InternetPassword | If needed for Web server authentication, this field displays the password needed for login.
PublisherSecurityMode | Identifies whether SQL Server Authentication or Windows Authentication is being used.
PublisherLogin | Displays the user name required for login to the Publisher. This property can only be set once at the time when the subscription is created.
PublisherPassword | Displays the password required to logon to the Publisher. This property can only be set once at the time when the subscription is created.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Synchronize Subscription

Synchronize Subscription |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The Synchronize Subscription dialog box in SQL Server Management Studio enables you to reinitialize a subscription, upload changes from the Subscriber before reinitializing, or discard all Subscriber changes during reinitialization.

Options

Reinitialize subscription

Select the Reinitialize subscription check box if you want to reinitialize a SQL Server Mobile subscription.

Upload changes from the Subscriber before reinitializing

Select the Upload changes radio button if you want to upload changes before beginning the reinitialization.

Discard all Subscriber changes

Select the Discard all Subscriber changes radio button if you want all changes at the Subscriber deleted. The subscription will be reinitialized and the Subscriber will be sent the current data from the Publisher.

Internet Password

Enter the Internet password if Web Authentication is used during synchronization.

SQL Server Password

Enter the SQL Server password if SQL Server Authentication is used during synchronization.

See Also

© 2005 Microsoft Corporation. All rights reserved.


New Index

New Index |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The New Index dialog box in SQL Server Management Studio lets you create a new index on a SQL Server 2005 Mobile Edition (SQL Server Mobile) database.

Options

Table name

Displays the name of the table that the index will be created on.

Index name

Specify the name of the index that you want to create.

Unique

Selecting this check box makes the index unique. No two rows are permitted to have the same index value. By default, this option is cleared.

Index Key Columns Name

Displays the name of the column that participates in the index key.

Sort Order

Specify the sort direction of the selected index column, either Ascending or Descending.

Data Type

Displays the data type information. If the table column is a computed column, Data type displays "computed column."

Size

Displays the maximum number of bytes required to store the column data type.

Identity

Displays whether the column participating in the index key is an identity column.

Allow Nulls

Displays whether the column participating in the index key permits NULL values to be stored in the table or view column.

Add

Add a column to the index key. Select table columns from the Select Columns dialog box that appears when you click Add.

Remove

Remove the selected column from participation in the index key.

Move Up

Move the selected column up in the index key grid. For more information about column order in an index, see General Index Design Guidelines.

Move Down

Move the selected column down in the index key grid.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Index Properties (SQL Server Mobile)

Index Properties (SQL Server Mobile) |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

These properties appear in the Properties window when you select an index in Table Designer.

Options

Table name

Displays the name of the table that the index is created on.

Index name

Displays the name of the index. If you create an index, specify the index name here.

Unique

Selecting this check box makes the index unique. No two rows are permitted to have the same index value. By default, this option is cleared.

Enforces primary key constraint

Indicates if the index has been created by the SQL Server Mobile Database Engine to enforce a primary key constraint. You cannot modify this check box. Therefore, the check box is dimmed. Use the Create Table and Edit Table dialog boxes to define columns that should be part of the primary key for the table that the index refers to.

Index Key Columns Name

Displays the name of the column that participates in the index key.

Sort Order

Specify the sort direction of the index key values for the column, either Ascending or Descending.

Data Type

Displays the data type information for the column.

Size

Displays the maximum number of bytes required to store the index key value for the column.

Identity

Displays whether the column participating in the index key is an identity column.

Allows Nulls

Displays whether the column participating in the index key permits NULL values to be stored in the table or view column.

Add

Add a column to the index key. Select table columns from the Select Columns dialog box that appears when you click Add.

Remove

Remove the selected column from participation in the index key.

Move Up

Move the selected column up in the index key grid.

Note:
The order of the columns in index key corresponds to the order in the grid.

Move Down

Move the selected column down in the index key grid.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Column Properties

Column Properties |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The Column Properties dialog box displays the properties for each column in the Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) database.

Options

Key

Indicates whether the column is part of primary key.

Name

Displays the name of the column.

Data Type

Displays the type of data that the column can hold. For more information, see Data Types.

Size

Displays the size of the column.

Identity

Displays whether the column is the identity column for the table. Permissible values are Yes and No.

Nulls

Displays whether the column accepts null values. Permissible values are Yes and No.

Default

Displays the SQL Server Mobile default bound to the column.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Table Properties

Table Properties |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The SQL Server Mobile Table Properties dialog box in SQL Server Management Studio displays the properties for each column in a table.

Options

Row

Expand General to see the number of rows in the table.

See Also

© 2005 Microsoft Corporation. All rights reserved.


New Table

New Table |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The SQL Server 2005 Mobile Edition (SQL Server Mobile) New Table dialog box in SQL Server Management Studio lets you create a new table with columns for a SQL Server Mobile database.

Options

Delete

Click Delete to delete this table.

Name

Enter the name of the table.

Column Name

Displays the name of the columns within the table.

Data Type

Displays the type of data that the column can hold. For more information, see "Using Data Types" in SQL Server Books Online.

Length

Displays the size of the column.

Allow Nulls

Displays whether the column accepts null values. Permissible values are Yes and No.

Unique

Specify whether the column has a unique constraint. The unique constraint applies only for individual columns. If you set the Unique value equal to Yes for two columns, SQL Server Mobile will create two unique constraints, and not a single constraint across both columns.

Primary Key

Specify whether the column is a primary key.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Edit Table (SQL Server Mobile)

Edit Table (SQL Server Mobile) |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The SQL Server 2005 Mobile Edition (SQL Server Mobile) Edit Table dialog box in SQL Server Management Studio lets you modify a table and columns for a SQL Server Mobile database.

Options

Delete

Click Delete to delete the selected column.

Name

Enter the name of the table.

Column Name

Displays the name of the columns and lets you modify the maximum length and size of the data in the column. You can change the length of the column only for variable-length data types.

Data Type

Displays the type of data that the column can hold. For more information, see "Using Data Types" in SQL Server Books Online.

Length

Displays the size of the column.

Allow Nulls

Displays whether the column accepts null values. Permissible values are Yes and No.

Unique

Displays whether there is a unique constraint defined specifically for the column. If you set the Unique value equal to Yes for two columns, SQL Server Mobile will create two unique constraints, not a single constraint across both columns.

Primary Key

Specify whether the column is part of a primary key.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Database Properties - General

Database Properties - General |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The Database Properties - General dialog box lets you see properties for existing SQL Server 2005 Mobile Edition (SQL Server Mobile) databases.

Options

Creation Date

Displays the date and time that the database was created.

Name

Displays the name and location of the database.

Size

Displays the size of the database.

Space Available

Displays the space that is available in the database.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Shrink & Repair

Shrink & Repair |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

SQL Server 2005 Mobile Edition (SQL Server Mobile) can shrink a database by removing unused pages. This operation occurs without the need for another file, temporary or otherwise, to be created.

SQL Server Mobile can also repair a database by examining the database file for corruption and repairing it if it is required.

Options

None

Select None if you do not want SQL Server Mobile to shrink or repair the database.

Shrink database by deleting free pages

Select Shrink database by deleting free pages if you want SQL Server Mobile to delete free pages and shrink the database.

Perform full database compaction

Select Perform full database compaction to compact the whole database without deleting pages.

Repair physically corrupted databases

Select Repair physically corrupted databases to have SQL Server Mobile look for database corruption and automatically repair the database.

Recover corrupted rows

If you select Repair physically corrupted databases, the Recover corrupted rows check box becomes enabled, and you can choose to preserve any corrupted rows.

Replace existing database

If you want to replace the existing database with the new version that has been shrunk or repaired, select Replace existing database.

Create new database with this filename

To create a new database during the repair process, specify the path and a new file name for the database.

Overwrite existing database file

Select Overwrite existing database file to instruct SQL Server Mobile to automatically overwrite the existing database during the repair process.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Database Properties - Set Password

Database Properties - Set Password |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The Database Properties - Set Password dialog box in SQL Server Management Studio lets you change the SQL Server 2005 Mobile Edition (SQL Server Mobile) database password. Setting strong passwords is essential to the security of the system. Always use strong passwords.

Caution:
You must close all open management dialog boxes before you change the database password. If you change the database password and then try to submit changes made in an open management dialog box, such as a table name in the New Table dialog box, you will receive an error message informing about the password mismatch.

Options

Old Password

Specify the old password.

New Password

Specify the new password.

Confirm Password

Re-enter the new password to confirm it.

Encrypt

Select the Encrypt check box if you want the data in the SQL Server Mobile database to be encrypted.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Create Database Dialog (SQL Server Mobile)

Create Database Dialog (SQL Server Mobile) |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The Create Database dialog box for Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) in SQL Server Management Studio lets you create a new database on the desktop computer that can later be copied and deployed to a device that is running SQL Server Mobile.

Options

Enter the new SQL Server Mobile database file name

In the Filename text field, enter the path and name of the SQL Server Mobile database that you want to create. You can also click Browse to find an existing database that you want to overwrite. If you do not provide a file name extension, the default .sdf extension will be assigned to the file name.

Overwrite existing database file

Select the Overwrite existing database file check box to delete a SQL Server Mobile database with the same name and replace it with the new database that you are creating.

Sort Order

From the Sort Order drop down list, select the database sort order you want to use.

Encrypt

Select the Encrypt check box if you want to encrypt the data in the database. If you choose to encrypt the database, you must specify a password. This feature uses the Secure Sockets Layer (SSL) feature of Microsoft Internet Information Services (IIS) to encrypt data propagated between a device that is running SQL Server Mobile and a computer that is running SQL Server.

New Password

You can, optionally, enter a password to help secure the new database. If you chose to encrypt the data, you must enter a password.

Confirm Password

Enter the same password again to confirm it.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Delete Objects (SQL Server Mobile)

Delete Objects (SQL Server Mobile) |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The Delete Object dialog box lets you delete database objects such as a table, index, trigger, view, key, constraint, default, rule, user-defined data type, or stored procedure.

Options

Objects to be deleted

Displays the list of database objects to be deleted. It displays the object name, object type, status, and message, if any, for the list of objects to be deleted.

Refresh

The Refresh button at the top helps you update the list of objects to be deleted.

Note:
The Schedule and Script button will always be deactivated because these features are not supported by Microsoft SQL Server 2005 Mobile Edition.

Remove

The Remove button at the right corner of the dialog box lets you remove the objects from the list that you do not want to delete.

See Also

© 2005 Microsoft Corporation. All rights reserved.


Delete Subscription (SQL Server Mobile)

Delete Subscription (SQL Server Mobile) |
 | See Also
User Interface Reference (SQL Server Mobile) > SQL Server Mobile Management Dialog Help in SQL Server Management Studio >

The Delete Subscription dialog box lets you delete a Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile) subscription.

Options

The following subscription will be deleted

Displays the name of the subscription to be deleted.

Refresh

The Refresh button at the top lets you refresh the list of subscriptions to be deleted.

Note:
The Schedule and Script button will always be deactivated because these features are not supported by SQL Server Mobile.

See Also

© 2005 Microsoft Corporation. All rights reserved.


SQL Server Mobile Copyright

SQL Server Mobile Copyright |
 | See Also

This document, including sample applications herein, is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. Information in this document, including samples, URL and other Internet Web site references, is subject to change without notice. The entire risk of the use or the results of the use of this document remains with the user.

Content Copyright

The primary purpose of a sample is to illustrate a concept, or a reasonable use of a particular statement or clause. Most samples do not include all of the code that would normally be found in a full production system, as a lot of the usual data validation and error handling is removed to focus the sample on a particular concept or statement. Technical support is not available for these samples or for the provided source code.

Unless otherwise noted, the example companies, organizations, products, people, and events depicted herein are fictitious and no association with any real company, organization, product, person, or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Active Directory, ActiveSync, ActiveX, Microsoft, Microsoft Press, MSDN, MS-DOS, Visual Basic, Visual C++, Visual C#, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

2002-2005 Microsoft Corporation. All rights reserved.

See Also

© 2005 Microsoft Corporation. All rights reserved.