|
| 1 | +--- |
| 2 | +title: "Installing OLE DB Driver for SQL Server | Microsoft Docs" |
| 3 | +description: "Installing and uninstalling OLE DB Driver for SQL Server" |
| 4 | +ms.custom: "" |
| 5 | +ms.date: "03/26/2018" |
| 6 | +ms.prod: "sql-non-specified" |
| 7 | +ms.prod_service: "database-engine, sql-database, sql-data-warehouse, pdw" |
| 8 | +ms.service: "" |
| 9 | +ms.component: "oledb|applications" |
| 10 | +ms.reviewer: "" |
| 11 | +ms.suite: "sql" |
| 12 | +ms.technology: |
| 13 | + - "docset-sql-devref" |
| 14 | +ms.tgt_pltfrm: "" |
| 15 | +ms.topic: "reference" |
| 16 | +helpviewer_keywords: |
| 17 | + - "OLE DB Driver for SQL Server, uninstalling" |
| 18 | + - "MSOLEDBSQL, installing" |
| 19 | + - "MSOLEDBSQL, uninstalling" |
| 20 | + - "Setup [OLE DB Driver for SQL Server]" |
| 21 | + - "uninstalling OLE DB Driver for SQL Server" |
| 22 | + - "data access [OLE DB Driver for SQL Server], uninstalling OLE DB Driver for SQL Server" |
| 23 | + - "installing OLE DB Driver for SQL Server" |
| 24 | + - "OLE DB Driver for SQL Server, installing" |
| 25 | + - "data access [OLE DB Driver for SQL Server], installing OLE DB Driver for SQL Server" |
| 26 | + - "removing OLE DB Driver for SQL Server" |
| 27 | +author: "pmasl" |
| 28 | +ms.author: "Pedro.Lopes" |
| 29 | +manager: "jhubbard" |
| 30 | +ms.workload: "Active" |
| 31 | +--- |
| 32 | +# Installing OLE DB Driver for SQL Server |
| 33 | +[!INCLUDE[appliesto-ss-asdb-asdw-pdw-md](../../../includes/appliesto-ss-asdb-asdw-pdw-md.md)] |
| 34 | + |
| 35 | +To install the OLE DB Driver for SQL Server you need msoledbsql.msi installer. |
| 36 | +Run the installer and make your preferred selections. The OLE DB Driver for SQL Server can be installed side-by-side with earlier versions of Microsoft OLE DB providers. |
| 37 | + |
| 38 | +To download the most recent version of the OLE DB Driver for SQL Server go to Microsoft Download Center. |
| 39 | + |
| 40 | + |
| 41 | + The OLE DB Driver for SQL Server files (msoledbsql.dll, msoledbsqlr.rll) are installed to the following location: |
| 42 | + |
| 43 | + `%SYSTEMROOT%\system32\` |
| 44 | + |
| 45 | +> [!NOTE] |
| 46 | +> All appropriate registry settings for the OLE DB Driver for SQL Server are made as part of the installation process. |
| 47 | +
|
| 48 | + The OLE DB Driver for SQL Server header and library files (msoledbsql.h and msoledbsql.lib) are installed in the following location: |
| 49 | + |
| 50 | + `%PROGRAMFILES%\Microsoft SQL Server\Client SDK\OLEDB\180\SDK` |
| 51 | + |
| 52 | + |
| 53 | + You can distribute OLE DB Driver for SQL Server through msoledbsql.msi. You might have to install OLE DB Driver for SQL Server when you deploy an application. One way to install multiple packages in what seems to the user to be a single installation is to use chainer and bootstrapper technology. For more information, see [Authoring a Custom Bootstrapper Package for Visual Studio 2005](http://go.microsoft.com/fwlink/?LinkId=115667) and [Adding Custom Prerequisites](http://go.microsoft.com/fwlink/?LinkId=115668). |
| 54 | + |
| 55 | +The x64 msoledbsql.msi also installs the 32-bit version of OLE DB Driver for SQL Server. If your application targets a platform other than the one it was developed on, you can download versions of msoledbsql.msi for x64 and x86. |
| 56 | + |
| 57 | + When you invoke msoledbsql.msi, only the client components are installed by default. The client components are are files that support running an application that was developed using OLE DB Driver for SQL Server. To also install the SDK components, specify `ADDLOCAL=All` on the command line. For example: |
| 58 | + |
| 59 | + `msiexec /i msoledbsql.msi ADDLOCAL=ALL APPGUID={0CC618CE-F36A-415E-84B4-FB1BFF6967E1}` |
| 60 | + |
| 61 | +## Silent Install |
| 62 | + If you use the /passive, /qn, /qb, or /qr option with msiexec, you must also specify IACCEPTMSOLEDBSQLLICENSETERMS=YES, to explicitly indicate that you accept the terms of the end user license. This option must be specified in all capital letters. |
| 63 | + |
| 64 | +## Uninstalling OLE DB Driver for SQL Server |
| 65 | + Because applications such as [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] server and the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] tools depend on OLE DB Driver for SQL Server, it is important not to uninstall OLE DB Driver for SQL Server until all dependent applications are uninstalled. To provide users with a warning that your application depends on OLE DB Driver for SQL Server, use the APPGUID install option in your MSI, as follows: |
| 66 | + |
| 67 | + `msiexec /i msoledbsql.msi APPGUID={0CC618CE-F36A-415E-84B4-FB1BFF6967E1}` |
| 68 | + |
| 69 | + The value passed to APPGUID is your specific product code. A product code must be created when using Microsoft Installer to bundle your application setup program. |
| 70 | + |
| 71 | +## See Also |
| 72 | + [Building Applications with OLE DB Driver for SQL Server](../../oledb/applications/building-applications-with-oledb-driver-for-sql-server.md) |
0 commit comments