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
This topic discusses how you can create a connection to a [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] database.
30
30
31
31
## Connection Properties
32
-
For this release of the [!INCLUDE[msCoName](../../../includes/msconame_md.md)] ODBC Driver for [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] on Linux or macOS, you can use the following connection keywords:
See [DSN and Connection String Keywords and Attributes](../../../connect/odbc/dsn-connection-string-attribute.md) for all the connection string keywords and attributes supported on Linux and Mac
40
34
41
35
> [!IMPORTANT]
42
36
> When connecting to a database that uses database mirroring (has a failover partner), do not specify the database name in the connection string. Instead, send a **use***database_name* command to connect to the database before executing your queries.
43
37
44
-
For more information about these keywords, see the ODBC section of [Using Connection String Keywords with SQL Server Native Client](http://go.microsoft.com/fwlink/?LinkID=126696).
45
-
46
38
The value passed to the **Driver** keyword can be one of the following:
47
39
48
40
- The name you used when you installed the driver.
@@ -96,15 +88,18 @@ SSL uses the OpenSSL library. The following table shows the minimum supported ve
96
88
97
89
|Platform|Minimum OpenSSL Version|Default Certificate Trust Store Location|
Copy file name to clipboardExpand all lines: docs/connect/odbc/linux-mac/programming-guidelines.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Programming Guidelines | Microsoft Docs"
2
+
title: "Programming Guidelines (ODBC Driver for SQL Server) | Microsoft Docs"
3
3
ms.custom: ""
4
4
ms.date: "01/11/2018"
5
5
ms.prod: "sql-non-specified"
@@ -23,7 +23,7 @@ ms.workload: "On Demand"
23
23
24
24
The programming features of the [!INCLUDE[msCoName](../../../includes/msconame_md.md)] ODBC Driver for [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] on macOS and Linux are based on ODBC in [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] Native Client ([SQL Server Native Client (ODBC)](http://go.microsoft.com/fwlink/?LinkID=134151)). [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] Native Client is based on ODBC in Windows Data Access Components ([ODBC Programmer's Reference](http://go.microsoft.com/fwlink/?LinkID=45250)).
25
25
26
-
An ODBC application can use Multiple Active Result Sets (MARS) and other [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] specific features by including `/usr/local/include/msodbcsql.h` after including the unixODBC headers (`sql.h`, `sqlext.h`, `sqltypes.h`, and `sqlucode.h`). Then use the same symbolic names for [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)]-specific items that you would in your Windows ODBC applications.
26
+
An ODBC application can use Multiple Active Result Sets (MARS) and other [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] specific features by including `/usr/local/include/msodbcsql.h` after including the unixODBC headers (`sql.h`, `sqlext.h`, `sqltypes.h`, and `sqlucode.h`). Then use the same symbolic names for [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)]-specific items that you would use in your Windows ODBC applications.
27
27
28
28
## Available Features
29
29
The following sections from the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] Native Client documentation for ODBC ([SQL Server Native Client (ODBC)](http://go.microsoft.com/fwlink/?LinkID=134151)) are valid when using the ODBC driver on macOS and Linux:
@@ -50,7 +50,7 @@ The following sections from the [!INCLUDE[ssNoVersion](../../../includes/ssnover
50
50
The following features have not been verified to work correctly in this release of the ODBC driver on macOS and Linux:
51
51
52
52
- Failover Cluster Connection
53
-
-[Transparent Network IP Resolution](https://docs.microsoft.com/en-us/sql/connect/odbc/linux/using-transparent-network-ip-resolution)
53
+
-[Transparent Network IP Resolution](https://docs.microsoft.com/en-us/sql/connect/odbc/linux/using-transparent-network-ip-resolution) (before ODBC Driver 17)
The following features are not available in this release of the ODBC driver on macOS and Linux:
@@ -102,15 +102,15 @@ For ODBC Driver 17, SQLCHAR data in one of the following character sets/encoding
102
102
|ISO-8859-13|Latin-7|
103
103
|ISO-8859-15|Latin-9|
104
104
105
-
Upon connection, the driver detects the current locale of the process it is loaded in. If it uses one of the encodings above, the driver will use that encoding for SQLCHAR (narrow-character) data; otherwise, it defaults to UTF-8. Since all processes start in the "C" locale by default (and thus cause the driver to default to UTF-8), if an application needs to use one of the encodings above, it should use the **setlocale** function to set the locale appropriately before connecting; either by specifying the desired locale explicitly, or using an empty string e.g.`setlocale(LC_ALL, "")` to use the locale settings of the environment.
105
+
Upon connection, the driver detects the current locale of the process it is loaded in. If it uses one of the encodings above, the driver uses that encoding for SQLCHAR (narrow-character) data; otherwise, it defaults to UTF-8. Since all processes start in the "C" locale by default (and thus cause the driver to default to UTF-8), if an application needs to use one of the encodings above, it should use the **setlocale** function to set the locale appropriately before connecting; either by specifying the desired locale explicitly, or using an empty string for example`setlocale(LC_ALL, "")` to use the locale settings of the environment.
106
106
107
-
Thus, in a typical Linux or Mac environment where the encoding is UTF-8, users of ODBC Driver 17 upgrading from 13 or 13.1 will not observe any differences. However, applications which use a non-UTF-8 encoding in the above list via `setlocale()` will need to use that encoding for data to/from the driver instead of UTF-8.
107
+
Thus, in a typical Linux or Mac environment where the encoding is UTF-8, users of ODBC Driver 17 upgrading from 13 or 13.1 will not observe any differences. However, applications that use a non-UTF-8 encoding in the above list via `setlocale()` need to use that encoding for data to/from the driver instead of UTF-8.
108
108
109
109
SQLWCHAR data must be UTF-16LE (Little Endian).
110
110
111
111
When binding input parameters with SQLBindParameter, if a narrow character SQL type such as SQL_VARCHAR is specified, the driver converts the supplied data from the client encoding to the default (typically codepage 1252) [!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] encoding. For output parameters, the driver converts from the encoding specified in the collation information associated with the data to the client encoding. However, data loss is possible --- characters in the source encoding not representable in the target encoding will convert to a question mark ('?').
112
112
113
-
To avoid this data loss when binding input parameters, specify a Unicode SQL character type such as SQL_NVARCHAR. In this case, the driver will convert from the client encoding to UTF-16, which can represent all Unicode characters. Furthermore, the target column or parameter on the server must also be either a Unicode type (**nchar**, **nvarchar**, **ntext**) or one with a collation/encoding which can represent all the characters of the original source data. For avoiding data loss with output parameters, specify a Unicode SQL type, and either a Unicode C type (SQL_C_WCHAR), causing the driver to return data as UTF-16; or a narrow C type, and ensure that the client encoding can represent all the characters of the source data (this is always possible with UTF-8.)
113
+
To avoid this data loss when binding input parameters, specify a Unicode SQL character type such as SQL_NVARCHAR. In this case, the driver converts from the client encoding to UTF-16, which can represent all Unicode characters. Furthermore, the target column or parameter on the server must also be either a Unicode type (**nchar**, **nvarchar**, **ntext**) or one with a collation/encoding, which can represent all the characters of the original source data. For avoiding data loss with output parameters, specify a Unicode SQL type, and either a Unicode C type (SQL_C_WCHAR), causing the driver to return data as UTF-16; or a narrow C type, and ensure that the client encoding can represent all the characters of the source data (this is always possible with UTF-8.)
114
114
115
115
For more information about collations and encodings, see [Collation and Unicode Support](../../../relational-databases/collations/collation-and-unicode-support.md).
-[DSN and Connection String Keywords and Attributes](dsn-connection-string-attribute.md)
46
+
-[SQL Server Native Client](../../relational-databases/native-client/features/sql-server-native-client-features.md) (the features available also apply, without OLEDB, to the ODBC Driver for SQL Server)
-[Support for High Availability and Disaster Recovery](../../connect/odbc/linux-mac/odbc-driver-on-linux-support-for-high-availability-disaster-recovery.md)
-[SQL Server Native Client](../../relational-databases/native-client/features/sql-server-native-client-features.md) (the features available also apply, without OLEDB, to the ODBC Driver for SQL Server)
Copy file name to clipboardExpand all lines: docs/connect/odbc/windows/dsn-wizard-3.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,10 @@ Alters the behavior of **Multi-subnet failover** to allow for faster reconnectio
79
79
80
80
Enables automatic decryption and encryption of data transfers to and from columns encrypted with the [Always Encrypted](../../../connect/odbc/using-always-encrypted-with-the-odbc-driver.md) feature available in SQL Server 2016 and later.
81
81
82
+
### Use FMTONLY metadata discovery:
83
+
84
+
Use the legacy SET FMTONLY metadata discovery method when connecting to SQL Server 2012 or newer. Enable this only when using queries not supported by [sp_describe_first_result_set](../../../relational-databases/system-stored-procedures/sp-describe-first-result-set-transact-sql.md), such as those containing temporary tables.
> This is the Cumulative Update (CU) repository. For more information about your repository options and their differences, see [Configure repositories for SQL Server on Linux](sql-server-linux-change-repo.md).
55
54
55
+
1. Refresh your repositories.
56
+
57
+
```bash
58
+
sudo zypper --gpg-auto-import-keys refresh
59
+
```
60
+
56
61
1. Run the following commands to install SQL Server:
0 commit comments