Distributing SQL Server Applications

Distributing SQL Server with Applications

After building and testing a Microsoft® SQL Server™ 2000 application, you must distribute it to customers. You must also be able to distribute the SQL Server components required by your application. There are two options for how you distribute SQL Server components with your application:

The licensing terms controlling the redistribution of SQL Server components are defined in the file Redist.txt, which is located on your SQL Server compact disc.

Distributing the SQL Server 2000 Desktop Engine

The SQL Server 2000 Desktop Engine is a redistributable version of the relational database engine in SQL Server 2000. It allows an application that uses the SQL Server relational database engine to install the engine as a part of the application setup process. The Desktop Engine is designed so that an application can use it to store data without requiring any database administration from the end user. The Desktop Engine is designed to manage its configuration and resource usage dynamically, minimizing the requirement for administration of the engine after it has been installed. The Desktop Engine does not include SQL Server utilities or tools that have graphical user interfaces. The application setup is coded to install the engine. After the Desktop Engine has been installed, either the application setup or the application use the standard SQL Server APIs (SQL-DMO, Transact-SQL, and so on) to create and configure the database, and the application uses the SQL Server APIs to perform any needed administration.

The Desktop Engine Setup uses the Windows Installer service that ships with Microsoft Windows® 2000 and is available on Windows NT® 4.0, Windows 98, and Windows 95. For more information about Windows Installer, see the MSDN Library at Microsoft Web site.

There are several methods an application setup program can use for installing the SQL Server Desktop Engine:

SQL Server 2000 Desktop Engine Setup installs the SQL Server client components, so you do not have to distribute the client components separately if you install SQL Server 2000 Desktop Engine.

Before attempting to install an instance of the Desktop Engine, an application setup process should first ensure that the proposed instance name has not already been used by another instance of SQL Server, and the computer does not already have more than 16 instances (or 15 named instances) installed. SQL Server 2000 supplies two API functions to perform these checks. For more information, see Desktop Engine Installation API.

Distributing the SQL Server Client Components

If your customers already have an installed instance of SQL Server to which they can connect, your application setup only has to install the SQL Server client components. This only needs to be done if your application setup detects that client components are not installed on the client: