Deploying Applications with SQL Server Native Client

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

When deploying an application that is dependent on SQL Server Native Client, you will need to redistribute SQL Server Native Client with your application. Unlike Microsoft Data Access Components (MDAC), which is now a component of the operating system, SQL Server Native Client is a component of SQL Server. Therefore, it is important to install SQL Server Native Client in your development environment and redistribute SQL Server Native Client with your application. For more information, see Installing SQL Server Native Client.

In addition to installing SQL Server Native Client as part of the SQL Server installation, there is also a redistributable installation program named sqlncli10.msi, which can be found on the SQL Server installation media in the following location:

%disk%\Setup\

For 64-bit Windows on Windows (WOW64) installations, you must use the 64-bit SQL Server Native Client package, named sqlncli10_x64.msi on the 32-bit installation disk and sqlncli10.msi on the 64-bit installation disk.

This installation file can be used to install SQL Server Native Client directly from the SQL Server installation media, and it can also be used to freely distribute SQL Server Native Client with your own custom applications.

When a custom application is built that uses SQL Server Native Client, the custom application should indicate that it depends on SQL Server Native Client through the install option APPGUID. This enables the SQL Server Native Client installer to warn the user before uninstalling that applications may be broken if the component is removed. When multiple applications are installed on the same system which depends on SQL Server Native Client, the warning (enabled when using the install option APPGUID) ensures that no other application blindly uninstalls SQL Server Native Client thereby breaking the remaining applications.

To indicate to SQL Server Native Client your dependency, you must set the APPGUID command line parameter to your product code when silently installing SQL Server Native Client. For example:

msiexec /i sqlncli10.msi APPGUID={0CC618CE-F36A-415E-84B4-FB1BFF6967E1}

As mentioned above, the APPGUID is set to your specific product code. A product code must be created when using Microsoft Installer to bundle your application setup program.

By default the SQL Server Native Client installer only installs the client components when installed independent of SQL Server. To install all components (client and the SDK components), specify ADDLOCAL=All on the command line. For example:

msiexec /i sqlncli10.msi ADDLOCAL=ALL APPGUID={0CC618CE-F36A-415E-84B4-FB1BFF6967E1}

See Also

Other Resources

SQL Server Native Client Concepts

Help and Information

Getting SQL Server 2008 Assistance