Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 427c4bf

Browse files
authored
Merge pull request #19364 from MicrosoftDocs/master
5/17 PM Publish
2 parents c48686d + b7c4fe7 commit 427c4bf

11 files changed

Lines changed: 480 additions & 502 deletions

docs/connect/odbc/linux-mac/data-access-tracing-with-the-odbc-driver-on-linux.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: "Data Access Tracing with the ODBC Driver on Linux and macOS"
3-
description: "Learn how to enable tracing on Linux and macOS with the Microsoft ODBC Driver for SQL Server to output a log file when troubleshooting application behavior."
2+
title: Data Access Tracing on Linux and macOS
3+
description: Learn how to enable tracing on Linux and macOS with the Microsoft ODBC Driver for SQL Server to output a log file when troubleshooting application behavior.
44
ms.custom: ""
55
ms.date: 09/01/2020
66
ms.prod: sql
@@ -15,22 +15,22 @@ ms.assetid: 3149173a-588e-47a0-9f50-edb8e9adf5e8
1515
author: David-Engel
1616
ms.author: v-daenge
1717
---
18-
# Data Access Tracing with the ODBC Driver on Linux and macOS
18+
# Data Access Tracing on Linux and macOS
1919

2020
[!INCLUDE[Driver_ODBC_Download](../../../includes/driver_odbc_download.md)]
2121

2222
The unixODBC Driver Manager on macOS and Linux supports tracing of ODBC API call entry and exit of the ODBC Driver for [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)].
2323

2424
To trace your application's ODBC behavior, edit the `odbcinst.ini` file's `[ODBC]` section to set the values `Trace=Yes` and `TraceFile`
25-
to the path of the file which is to contain the trace output; for example:
25+
to the path of the file that is to contain the trace output. For example:
2626

2727
```ini
2828
[ODBC]
2929
Trace=Yes
3030
TraceFile=/home/myappuser/odbctrace.log
3131
```
3232

33-
(You may also use `/dev/stdout` or any other device name to send trace output there instead of to a persistent file.) With the above settings, every time an application loads the unixODBC Driver Manager, it will record all the ODBC API calls which it performed into the output file.
33+
(You may also use `/dev/stdout` or any other device name to send trace output there instead of to a persistent file.) With the above settings, every time an application loads the unixODBC Driver Manager, it will record all ODBC API calls made, into the output file.
3434

3535
After you finish tracing your application, remove `Trace=Yes` from the `odbcinst.ini` file to avoid the performance penalty of tracing, and ensure any unnecessary trace files are removed.
3636

@@ -42,13 +42,13 @@ $ ODBCSYSINI=/home/myappuser myapp
4242

4343
In this case, you can add `Trace=Yes` to the `[ODBC Driver 17 for SQL Server]` section of `/home/myappuser/odbcinst.ini`.
4444

45-
## Determining which odbc.ini File the Driver is Using
45+
## Determining which odbc.ini file the driver is using
4646

47-
The Linux and macOS ODBC drivers do not know which `odbc.ini` is in use, or the path to the `odbc.ini` file. However, information about which `odbc.ini` file is in use is available from the unixODBC tools `odbc_config` and `odbcinst`, and from the unixODBC Driver Manager documentation.
47+
The Linux and macOS ODBC drivers don't know which `odbc.ini` is in use, or the path to the `odbc.ini` file. However, information about which `odbc.ini` file is in use is available from the unixODBC tools `odbc_config` and `odbcinst`, and from the unixODBC Driver Manager documentation.
4848

49-
For example, the following command prints (among other information) the location of system and user `odbc.ini` files which contain, respectively, system and user DSNs:
49+
For example, the following command prints (among other information) the location of system and user `odbc.ini` files that contain, respectively, system and user DSNs:
5050

51-
```
51+
```bash
5252
$ odbcinst -j
5353
unixODBC 2.3.1
5454
DRIVERS............: /etc/odbcinst.ini
@@ -62,10 +62,10 @@ SQLSETPOSIROW Size.: 8
6262

6363
The [unixODBC documentation](http://www.unixodbc.org/doc/UserManual/) explains the differences between user and system DSNs. In summary:
6464

65-
- User DSNs --- these are DSNs which are only available to a specific user. Users can connect using, add, modify, and remove their own user DSNs. User DSNs are stored in a file in the user's home directory, or a subdirectory thereof.
65+
- User DSNs - DSNs that are only available to a specific user. Users can connect using, add, modify, and remove their own user DSNs. User DSNs are stored in a file in the user's home directory, or a subdirectory.
6666
67-
- System DSNs --- these DSNs are available for every user on the system to connect using them, but can only be added, modified, and removed by a system administrator. If a user has a user DSN with the same name as a system DSN, the user DSN will be used upon connections by that user.
67+
- System DSNs - these DSNs are available for every user on the system to connect using them, but can only be added, modified, and removed by a system administrator. If a user has a user DSN with the same name as a system DSN, the user DSN will be used upon connections by that user.
6868
69-
## See Also
69+
## See also
7070
71-
- [Programming Guidelines](../../../connect/odbc/linux-mac/programming-guidelines.md)
71+
- [Programming Guidelines](programming-guidelines.md)
Lines changed: 65 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "ODBC Driver on Linux and macOS - High Availability and Disaster Recovery"
3-
description: "Learn about how the Microsoft ODBC Driver for Linux and macOS support AlwaysOn Availability Groups."
2+
title: High Availability and Disaster Recovery on Linux and macOS
3+
description: Learn about how the Microsoft ODBC Driver for Linux and macOS supports AlwaysOn Availability Groups and failover clusters.
44
ms.custom: ""
5-
ms.date: "05/06/2020"
5+
ms.date: 05/06/2020
66
ms.prod: sql
77
ms.prod_service: connectivity
88
ms.reviewer: ""
@@ -12,91 +12,90 @@ ms.assetid: fa656c5b-a935-40bf-bc20-e517ca5cd0ba
1212
author: David-Engel
1313
ms.author: v-daenge
1414
---
15-
# ODBC Driver on Linux and macOS Support for High Availability and Disaster Recovery
15+
# High Availability and Disaster Recovery on Linux and macOS
16+
1617
[!INCLUDE[Driver_ODBC_Download](../../../includes/driver_odbc_download.md)]
1718

18-
The ODBC drivers for Linux and macOS support [!INCLUDE[ssHADR](../../../includes/sshadr_md.md)]. For more information about [!INCLUDE[ssHADR](../../../includes/sshadr_md.md)], see:
19-
20-
- [Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server)](../../../database-engine/availability-groups/windows/listeners-client-connectivity-application-failover.md)
21-
22-
- [Creation and Configuration of Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/creation-and-configuration-of-availability-groups-sql-server.md)
23-
24-
- [Failover Clustering and AlwaysOn Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/failover-clustering-and-always-on-availability-groups-sql-server.md)
25-
26-
- [Active Secondaries: Readable Secondary Replicas (AlwaysOn Availability Groups)](../../../database-engine/availability-groups/windows/active-secondaries-readable-secondary-replicas-always-on-availability-groups.md)
27-
19+
The ODBC drivers for Linux and macOS support [!INCLUDE[ssHADR](../../../includes/sshadr_md.md)]. For more information about [!INCLUDE[ssHADR](../../../includes/sshadr_md.md)], see:
20+
21+
- [Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server)](../../../database-engine/availability-groups/windows/listeners-client-connectivity-application-failover.md)
22+
23+
- [Creation and Configuration of Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/creation-and-configuration-of-availability-groups-sql-server.md)
24+
25+
- [Failover Clustering and AlwaysOn Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/failover-clustering-and-always-on-availability-groups-sql-server.md)
26+
27+
- [Active Secondaries: Readable Secondary Replicas (AlwaysOn Availability Groups)](../../../database-engine/availability-groups/windows/active-secondaries-readable-secondary-replicas-always-on-availability-groups.md)
28+
2829
You can specify the availability group listener of a given availability group in the connection string. If an ODBC application on Linux or macOS is connected to a database in an availability group that fails over, the original connection is broken and the application must open a new connection to continue work after the failover.
2930

30-
The ODBC drivers on Linux and macOS iterate sequentially through all IP addresses associated with a DNS hostname if you are not connecting to an availability group listener, and multiple IP addresses are associated with the hostname.
31+
The ODBC drivers on Linux and macOS iterate sequentially through all IP addresses associated with a DNS hostname if you aren't connecting to an availability group listener, and multiple IP addresses are associated with the hostname.
3132

32-
If the DNS server's first returned IP address is not connectable, these iterations can be time consuming. When connecting to an availability group listener, the driver attempts to establish connections to all IP addresses in parallel. If a connection attempt succeeds, the driver discards any pending connection attempts.
33+
If the DNS server's first returned IP address isn't connectable, these iterations can be time consuming. When connecting to an availability group listener, the driver attempts to establish connections to all IP addresses in parallel. If a connection attempt succeeds, the driver discards any pending connection attempts.
3334

34-
> [!NOTE]
35+
> [!NOTE]
3536
> Because a connection can fail due to an availability group failover, implement connection retry logic; retry a failed connection until it reconnects. Increasing connection timeout and implementing connection retry logic increases the chance of connecting to an availability group.
3637
37-
## Connecting With MultiSubnetFailover
38+
## Connecting with MultiSubnetFailover
3839

3940
Always specify **MultiSubnetFailover=Yes** when connecting to a [!INCLUDE[ssSQL11](../../../includes/sssql11-md.md)] availability group listener or [!INCLUDE[ssSQL11](../../../includes/sssql11-md.md)] Failover Cluster Instance. **MultiSubnetFailover** enables faster failover for all Availability Groups and failover cluster instance in [!INCLUDE[ssSQL11](../../../includes/sssql11-md.md)]. **MultiSubnetFailover** also significantly reduces failover time for single and multi-subnet AlwaysOn topologies. During a multisubnet failover, the client attempts connections in parallel. During a subnet failover, the driver aggressively retries the TCP connection.
4041

41-
The **MultiSubnetFailover** connection property indicates that the application is being deployed in an availability group or Failover Cluster Instance. The driver tries to connect to the database on the primary [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] instance by trying to connect to all the IP addresses. When connecting with **MultiSubnetFailover=Yes**, the client retries TCP connection attempts faster than the operating system's default TCP retransmit intervals. **MultiSubnetFailover=Yes** enables faster reconnection after failover of either an AlwaysOn Availability Group or an AlwaysOn Failover Cluster Instance. **MultiSubnetFailover=Yes** applies to both single- and multi-subnet Availability Groups and Failover Cluster Instances.
42+
The **MultiSubnetFailover** connection property indicates that the application is being deployed in an availability group or Failover Cluster Instance. The driver tries to connect to the database on the primary [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] instance by trying to connect to all the IP addresses. When connecting with **MultiSubnetFailover=Yes**, the client retries TCP connection attempts faster than the operating system's default TCP retransmit intervals. **MultiSubnetFailover=Yes** enables faster reconnection after failover of either an AlwaysOn Availability Group or an AlwaysOn Failover Cluster Instance. **MultiSubnetFailover=Yes** applies to both single- and multi-subnet Availability Groups and Failover Cluster Instances.
4243

4344
Use **MultiSubnetFailover=Yes** when connecting to an availability group listener or Failover Cluster Instance. Otherwise, your application's performance can be negatively affected.
4445

45-
Note the following when connecting to a server in an availability group or Failover Cluster Instance:
46-
47-
- Specify **MultiSubnetFailover=Yes** to improve performance when connecting to a single subnet or multi-subnet Availability Group.
46+
Note the following recommendations when connecting to a server in an availability group or Failover Cluster Instance:
4847

49-
- Specify the availability group listener of the availability group as the server in your connection string.
50-
51-
- You cannot connect to a [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] instance configured with more than 64 IP addresses.
48+
- Specify **MultiSubnetFailover=Yes** to improve performance when connecting to a single subnet or multi-subnet Availability Group.
5249

53-
- Both [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Authentication or Kerberos Authentication can be used with **MultiSubnetFailover=Yes** without affecting the behavior of the application.
50+
- Specify the availability group listener of the availability group as the server in your connection string.
5451

55-
- You can increase the value of **loginTimeout** to accommodate for failover time and reduce the application's connection retry attempts.
52+
- You can't connect to a [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] instance configured with more than 64 IP addresses.
5653

57-
- Distributed transactions are not supported.
58-
59-
If read-only routing is not in effect, connecting to a secondary replica location in an availability group fails in the following situations:
60-
61-
1. If the secondary replica location is not configured to accept connections.
62-
63-
2. If an application uses **ApplicationIntent=ReadWrite** and the secondary replica location is configured for read-only access.
64-
65-
A connection fails if a primary replica is configured to reject read-only workloads and the connection string contains **ApplicationIntent=ReadOnly**.
54+
- Both [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Authentication or Kerberos Authentication can be used with **MultiSubnetFailover=Yes** without affecting the behavior of the application.
6655

56+
- You can increase the value of **loginTimeout** to accommodate for failover time and reduce the application's connection retry attempts.
57+
58+
- Distributed transactions aren't supported.
59+
60+
If read-only routing isn't in effect, connecting to a secondary replica location in an availability group fails in the following situations:
61+
62+
- If the secondary replica location isn't configured to accept connections.
63+
64+
- If an application uses **ApplicationIntent=ReadWrite** and the secondary replica location is configured for read-only access.
65+
66+
A connection fails if a primary replica is configured to reject read-only workloads and the connection string contains **ApplicationIntent=ReadOnly**.
6767

6868
[!INCLUDE[specify-application-intent_read-only-routing](~/includes/paragraph-content/specify-application-intent-read-only-routing.md)]
6969

70+
## ODBC syntax
71+
72+
Two ODBC connection string keywords support [!INCLUDE[ssHADR](../../../includes/sshadr_md.md)]:
7073

71-
## ODBC Syntax
74+
- **ApplicationIntent**
75+
76+
- **MultiSubnetFailover**
77+
78+
For more information about ODBC connection string keywords, see [Using Connection String Keywords with SQL Server Native Client](../../../relational-databases/native-client/applications/using-connection-string-keywords-with-sql-server-native-client.md).
7279

73-
Two ODBC connection string keywords support [!INCLUDE[ssHADR](../../../includes/sshadr_md.md)]:
74-
75-
- **ApplicationIntent**
76-
77-
- **MultiSubnetFailover**
78-
79-
For more information about ODBC connection string keywords, see [Using Connection String Keywords with SQL Server Native Client](../../../relational-databases/native-client/applications/using-connection-string-keywords-with-sql-server-native-client.md).
80-
8180
The equivalent connection attributes are:
82-
83-
- **SQL_COPT_SS_APPLICATION_INTENT**
84-
85-
- **SQL_COPT_SS_MULTISUBNET_FAILOVER**
86-
87-
For more information about ODBC connection attributes, see [SQLSetConnectAttr](../../../relational-databases/native-client-odbc-api/sqlsetconnectattr.md).
88-
89-
An ODBC application that uses [!INCLUDE[ssHADR](../../../includes/sshadr_md.md)] can use one of two functions to make the connection:
90-
91-
|Function|Description|
92-
|------------|---------------|
93-
|[SQLConnect Function](../../../odbc/reference/syntax/sqlconnect-function.md)|**SQLConnect** supports both **ApplicationIntent** and **MultiSubnetFailover** via a data source name (DSN) or connection attribute.|
94-
|[SQLDriverConnect Function](../../../odbc/reference/syntax/sqldriverconnect-function.md)|**SQLDriverConnect** supports **ApplicationIntent** and **MultiSubnetFailover** via DSN, connection string keyword, or connection attribute.|
95-
96-
## See Also
97-
98-
[Connection String Keywords and Data Source Names (DSNs)](../../../connect/odbc/linux-mac/connection-string-keywords-and-data-source-names-dsns.md)
99-
100-
[Programming Guidelines](../../../connect/odbc/linux-mac/programming-guidelines.md)
101-
102-
[Release Notes](../../../connect/odbc/linux-mac/release-notes-odbc-sql-server-linux-mac.md)
81+
82+
- **SQL_COPT_SS_APPLICATION_INTENT**
83+
84+
- **SQL_COPT_SS_MULTISUBNET_FAILOVER**
85+
86+
For more information about ODBC connection attributes, see [SQLSetConnectAttr](../../../relational-databases/native-client-odbc-api/sqlsetconnectattr.md).
87+
88+
An ODBC application that uses [!INCLUDE[ssHADR](../../../includes/sshadr_md.md)] can use one of two functions to make the connection:
89+
90+
| Function | Description |
91+
|--|--|
92+
| [SQLConnect Function](../../../odbc/reference/syntax/sqlconnect-function.md) | **SQLConnect** supports both **ApplicationIntent** and **MultiSubnetFailover** via a data source name (DSN) or connection attribute. |
93+
| [SQLDriverConnect Function](../../../odbc/reference/syntax/sqldriverconnect-function.md) | **SQLDriverConnect** supports **ApplicationIntent** and **MultiSubnetFailover** via DSN, connection string keyword, or connection attribute. |
94+
95+
## See also
96+
97+
[Connection String Keywords and Data Source Names (DSNs)](connection-string-keywords-and-data-source-names-dsns.md)
98+
99+
[Programming Guidelines](programming-guidelines.md)
100+
101+
[Release Notes](release-notes-odbc-sql-server-linux-mac.md)

0 commit comments

Comments
 (0)