You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure-sql/managed-instance/connectivity-architecture-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ For more information about the connectivity architecture and management traffic,
149
149
150
150
The following constraints on virtual network features and traffic are in effect:
151
151
152
-
-**Private subnets**: Deploying SQL managed instances in private subnets (where [default outbound access](/azure/virtual-network/ip-services/default-outbound-access) is disabled) is currently not supported.
152
+
-**Private subnets**: SQL managed instances can operate in private subnets. However, deployments to private subnets are expected to fail in the following regions: **Qatar Central**, **Israel Central**, **Israel Northwest**, **UAE Central**, and **UAE North**. To deploy a SQL managed instance in one of these regions, enable default outbound access for the subnet, deploy the instance, and then change the subnet to back to private (disable default outbound access). For information on how to configure private subnets, see [Default outbound access in Azure](/azure/virtual-network/ip-services/default-outbound-access).
153
153
-**VNet encryption**: Deploying and operating SQL managed instances in virtual networks where [Azure Virtual Network encryption](/azure/virtual-network/virtual-network-encryption-overview) is enabled is currently not supported.
154
154
-**Database mail to external SMTP relays on port 25**: Sending [database mail](/sql/relational-databases/database-mail/configure-database-mail) via port 25 to external email services is only available to certain subscription types in Microsoft Azure. Instances on other subscription types should use a different port (for example, 587) to contact external SMTP relays. Otherwise, instances might fail to deliver database mail. For more information, see [Troubleshoot outbound SMTP connectivity problems in Azure](/azure/virtual-network/troubleshoot-outbound-smtp-connectivity).
155
155
-**Microsoft peering**: Enabling [Microsoft peering](/azure/expressroute/expressroute-faqs#microsoft-peering) on ExpressRoute circuits that are peered directly or transitively with a virtual network in which SQL Managed Instance resides affects traffic flow between SQL Managed Instance components inside the virtual network and services it depends on. Availability issues result. SQL Managed Instance deployments to a virtual network that already has Microsoft peering enabled are expected to fail.
This example should be considered a proof of concept only. The sample code is simplified for clarity, and doesn't necessarily represent best practices recommended by Microsoft. Other examples, which use the same crucial functions are available in the [GitHub sample repository](https://github.com/tediousjs/tedious/blob/master/examples/).
16
-
16
+
17
+
## Prerequisites
18
+
19
+
Before you run the sample code, make sure the following prerequisites are met:
20
+
21
+
-**Node.js** is installed on your development machine. Download it from [nodejs.org](https://nodejs.org/).
22
+
- The **tedious** npm package is installed. Run `npm install tedious` in your project directory.
23
+
- A SQL Server instance is available and configured to accept connections:
24
+
-**TCP/IP protocol** is enabled in SQL Server Configuration Manager. TCP/IP is disabled by default on SQL Server Express editions.
25
+
-**SQL Server Browser service** is running if you're connecting to a named instance.
26
+
- The firewall allows connections on the SQL Server port (default: 1433).
27
+
- For SQL Server authentication, a SQL login is enabled and SQL Server is configured for **mixed mode authentication**.
28
+
29
+
> [!TIP]
30
+
> If you receive a connection error such as `Failed to connect`, verify that TCP/IP is enabled and the SQL Server service is running. For local development, try connecting with `server: 'localhost'` or `server: '127.0.0.1'`.
31
+
17
32
## Step 1: Connect
18
33
19
34
Use the **new Connection** function to connect to SQL Database.
@@ -45,7 +60,7 @@ Use the **new Connection** function to connect to SQL Database.
45
60
46
61
```
47
62
48
-
## Step 2: Execute a query
63
+
## Step 2: Execute a query
49
64
50
65
51
66
Execute all SQL statements using the **new Request** function. If the statement returns rows, such as a select statement, you can retrieve them using the **request.on** function. If there are no rows, the request.on function returns empty lists.
Copy file name to clipboardExpand all lines: docs/connect/odbc/download-odbc-driver-for-sql-server.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Download ODBC Driver for SQL Server
3
3
description: Download the Microsoft ODBC Driver for SQL Server to develop native-code applications that connect to SQL Server and Azure SQL Database.
4
4
author: David-Engel
5
5
ms.author: davidengel
6
-
ms.date: 12/17/2025
6
+
ms.date: 03/25/2026
7
7
ms.service: sql
8
8
ms.subservice: connectivity
9
9
ms.topic: concept-article
@@ -18,6 +18,17 @@ ms.custom:
18
18
19
19
Microsoft ODBC Driver for SQL Server is a single dynamic-link library (DLL) containing run-time support for applications using native-code APIs to connect to SQL Server. Use Microsoft ODBC Driver 18 for SQL Server to create new applications or enhance existing applications that need to take advantage of newer SQL Server features.
20
20
21
+
## Prerequisites
22
+
23
+
Before you install the ODBC driver on Windows, make sure you have the following prerequisites:
24
+
25
+
-**Visual C++ Redistributable**: The ODBC Driver for SQL Server requires the Microsoft Visual C++ Redistributable. If this component isn't already installed on your system, download and install it before installing the ODBC driver. Download the version that matches your system architecture (x64, x86, or ARM64) from [Microsoft Visual C++ Redistributable latest supported downloads](/cpp/windows/latest-supported-vc-redist).
26
+
27
+
> [!NOTE]
28
+
> Most Windows systems already have the Visual C++ Redistributable installed. If the ODBC driver installation fails or the driver doesn't load correctly, verify that the Visual C++ Redistributable is installed on your system.
29
+
30
+
Linux and macOS don't require this component. For Linux and macOS prerequisites, see the installation guides linked in the [Download for Linux and macOS](#download-for-linux-and-macos) section.
31
+
21
32
## Download for Windows
22
33
23
34
The redistributable installer for Microsoft ODBC Driver 18 for SQL Server installs the client components, which are required during run time to take advantage of newer SQL Server features. It optionally installs the header files needed to develop an application that uses the ODBC API. Starting with version 17.4.2, the installer also includes and installs the Microsoft Active Directory Authentication Library (ADAL.dll).
Copy file name to clipboardExpand all lines: docs/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to install the Microsoft ODBC Driver for SQL Server on ma
4
4
author: David-Engel
5
5
ms.author: davidengel
6
6
ms.reviewer: vanto
7
-
ms.date: 09/12/2024
7
+
ms.date: 03/25/2026
8
8
ms.service: sql
9
9
ms.subservice: connectivity
10
10
ms.topic: install-set-up-deploy
@@ -85,11 +85,28 @@ The driver needs to load the resource file in order to function. This file is ca
85
85
86
86
Some users encounter an issue when trying to connect after installing the ODBC driver and receive an error like: `"[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 18 for SQL Server' : file not found (0) (SQLDriverConnect)"`. It might be the case that unixODBC isn't configured correctly to find registered drivers. In these cases, creating symbolic links can resolve the issue.
87
87
88
+
The correct paths depend on your Mac's architecture. Run `brew --prefix` to determine your Homebrew installation prefix:
89
+
90
+
-**Apple Silicon (ARM64)** — Homebrew prefix is `/opt/homebrew`
91
+
-**Intel (x64)** — Homebrew prefix is `/usr/local`
> On macOS 15 (Sequoia) and later, the `/usr/local/etc/` directory might not exist by default, especially on Apple Silicon Macs. If the directory doesn't exist, the ODBC configuration files are located under your Homebrew prefix. Run `brew --prefix` to verify the correct path for your system.
109
+
93
110
For other cases where you're unable to make a connection to SQL Server using the ODBC driver, see the known issues article on [troubleshooting connection problems](known-issues-in-this-version-of-the-driver.md#connectivity).
94
111
95
112
If brew is having trouble finding the formulas, make sure you didn't skip the install step: `brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release`
1. Identify which version of the PHP driver to use, based on your environment. For more information, see [System requirements for the Microsoft Drivers for PHP for SQL Server](system-requirements-for-the-php-sql-driver.md).
18
+
To connect to SQL Server from a PHP application, you need the following components installed in this order:
19
19
20
-
1. Download and install the [Microsoft Drivers for PHP for SQL Server](microsoft-php-driver-for-sql-server.md#download).
20
+
1.**PHP runtime**: Download and install PHP from [php.net](https://www.php.net/downloads.php) (Windows) or use your system package manager (Linux/macOS).
21
21
22
-
1. Download and install the [ODBC Driver for SQL Server](../odbc/download-odbc-driver-for-sql-server.md).
22
+
1.**Microsoft ODBC Driver for SQL Server**: The PHP drivers require the ODBC driver. Download it from [Download ODBC Driver for SQL Server](../odbc/download-odbc-driver-for-sql-server.md).
23
+
24
+
1.**Microsoft Drivers for PHP for SQL Server**: Download the drivers from [Download the Microsoft Drivers for PHP for SQL Server](download-drivers-php-sql-server.md). For more information on version compatibility, see [System requirements for the Microsoft Drivers for PHP for SQL Server](system-requirements-for-the-php-sql-driver.md).
23
25
24
-
1.Configure the PHP driver and web server for your specific operating system.
26
+
1.**Web server** (optional): Configure IIS (Windows) or Apache/Nginx (Linux/macOS) if you're building web applications.
25
27
26
28
## Windows
27
29
28
-
- To configure loading the PHP driver, see [Loading the Microsoft Drivers for PHP for SQL Server](loading-the-php-sql-driver.md).
29
-
- To configure IIS to host PHP applications, see [Download the Microsoft Drivers for PHP for SQL Server](download-drivers-php-sql-server.md).
30
+
1.[Download and install PHP](https://windows.php.net/download/) — use the **Thread Safe** (TS) version for IIS, or **Non-Thread Safe** (NTS) for Apache or CLI.
31
+
1. Download and install the [ODBC Driver for SQL Server](../odbc/download-odbc-driver-for-sql-server.md).
32
+
1. Download the [Microsoft Drivers for PHP for SQL Server](download-drivers-php-sql-server.md) and extract the `.dll` files to your PHP extensions directory.
33
+
1. Enable the driver by adding the following lines to your `php.ini` file:
34
+
35
+
```ini
36
+
extension=php_sqlsrv.dll
37
+
extension=php_pdo_sqlsrv.dll
38
+
```
39
+
40
+
1. Verify the installation by running `php -m` and checking that `sqlsrv` and `pdo_sqlsrv` appear in the list.
41
+
42
+
For detailed instructions, see [Loading the Microsoft Drivers for PHP for SQL Server](loading-the-php-sql-driver.md). To configure IIS, see [Download the Microsoft Drivers for PHP for SQL Server](download-drivers-php-sql-server.md).
30
43
31
44
## Linux and macOS
32
45
33
-
To configure loading the PHPdriver and configure your web server to host PHP applications, see [Linux and macOS Installation Tutorial for the Microsoft Drivers for PHP for SQL Server](installation-tutorial-linux-mac.md).
46
+
For step-by-step instructions on installing PHP, the ODBC driver, and the PHP drivers on Linux and macOS, see [Linux and macOS Installation Tutorial for the Microsoft Drivers for PHP for SQL Server](installation-tutorial-linux-mac.md).
Copy file name to clipboardExpand all lines: docs/connect/ruby/step-1-configure-development-environment-for-ruby-development.md
+82-91Lines changed: 82 additions & 91 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,100 +3,91 @@ title: "Step 1: Configure development environment for Ruby"
3
3
description: "Step 1 of this getting started guide involves installing Ruby and an ODBC driver for SQL Server into your development environment."
4
4
author: David-Engel
5
5
ms.author: davidengel
6
-
ms.date: "01/19/2017"
6
+
ms.date: "03/25/2026"
7
7
ms.service: sql
8
8
ms.subservice: connectivity
9
9
ms.custom: linux-related-content
10
10
ms.topic: how-to
11
11
---
12
12
# Step 1: Configure development environment for Ruby development
13
-
You will need to configure your development environment with the prerequisites in order to develop an application using the Ruby Driver for SQL Server.
14
-
15
-
The Ruby Driver uses the TDS protocol, which is enabled by default in SQL Server and Azure SQL Database. No additional configuration is required.
16
-
17
-
18
-
## Windows
19
-
20
-
1.**Download Ruby Installer**
21
-
If your machine does not have Ruby, install it. For new ruby users, we recommend you use Ruby 2.2.X installers, which provide a stable language and an extensive list of packages (gems) that are compatible and updated. Go the [Ruby download page](https://rubyinstaller.org/downloads/) and download the appropriate 2.1.x installer. For example if you are on a 64-bit machine, download the Ruby 2.1.6 (x64) installer.
22
-
23
-
2.**Install Ruby**
24
-
Once the installer is downloaded:
25
-
a. Double-click the file to start the installer.
26
-
b. Select your language, and agree to the terms.
27
-
c. On the install settings screen, select the check boxes next to both Add Ruby executables to your PATH and associate `.rb` and `.rbw` files with this Ruby installation.
28
-
29
-
3.**Download Ruby DevKit**
30
-
Download DevKit from the RubyInstaller page
31
-
32
-
4.**Install Ruby DevKit**
33
-
After the download is finished:
34
-
a. Double-click the file. You will be asked where to extract the files.
35
-
b. Click the "..." button, and select "C:\DevKit". You will probably need to create this folder first by clicking "Make New Folder".
36
-
c. Click "OK", and then "Extract", to extract the files.
37
-
38
-
5.**Open cmd.exe**
39
-
40
-
6.**Initialize Ruby DevKit**
41
-
```
42
-
> chdir C:\DevKit
43
-
> ruby dk.rb init
44
-
> ruby dk.rb install
45
-
```
46
-
47
-
7.**Install TinyTDS gem**
48
-
```
49
-
> gem inst tiny_tds
50
-
```
51
-
52
-
## Ubuntu Linux
53
-
54
-
1.**Open terminal**
55
-
56
-
2.**Install Ruby Version Manager (`rvm`) and prerequisites**
Configure your development environment with the prerequisites to develop an application by using the Ruby Driver for SQL Server.
15
+
16
+
The Ruby Driver uses the TDS protocol, which is enabled by default in SQL Server and Azure SQL Database. No additional configuration is required.
17
+
18
+
## Windows
19
+
20
+
1.**Download Ruby Installer**
21
+
If your machine doesn't have Ruby, install it. Go to the [Ruby download page](https://rubyinstaller.org/downloads/) and download the latest **Ruby+Devkit** installer for your architecture (x64 or x86). For example, download **Ruby+Devkit 3.2.x (x64)**.
22
+
23
+
1.**Install Ruby**
24
+
Run the installer:
25
+
1. Select your language, and agree to the terms.
26
+
1. On the install settings screen, select the check boxes next to both **Add Ruby executables to your PATH** and **Associate `.rb` and `.rbw` files with this Ruby installation**.
27
+
1. After installation, the MSYS2 setup dialog appears. Select option **3** (MSYS2 and MINGW development toolchain) and press **Enter** to install the build tools.
28
+
29
+
1.**Open a new command prompt**
30
+
31
+
1.**Install TinyTDS gem**
32
+
```
33
+
gem install tiny_tds
34
+
```
35
+
36
+
> [!NOTE]
37
+
> Previous versions of Ruby (2.x) required a separate DevKit download and `dk.rb init` / `dk.rb install` commands. Ruby 3.0 and later versions include the MSYS2 DevKit in the installer, so separate DevKit setup is no longer required.
38
+
39
+
## Ubuntu Linux
40
+
41
+
1.**Open terminal**
42
+
43
+
1.**Install Ruby and prerequisites**
44
+
```bash
45
+
sudo apt-get update
46
+
sudo apt-get install -y ruby-full build-essential
47
+
```
48
+
49
+
1.**Verify Ruby installation**
50
+
```bash
51
+
ruby -v
52
+
```
53
+
54
+
1.**Install FreeTDS**
55
+
```bash
56
+
sudo apt-get install -y freetds-dev freetds-bin
57
+
```
58
+
59
+
1.**Install TinyTDS**
60
+
```bash
61
+
gem install tiny_tds
62
+
```
63
+
64
+
## macOS
65
+
66
+
macOS includes a system Ruby installation, but for best results, install a current version by using Homebrew.
0 commit comments