Skip to content

Commit ad821c5

Browse files
authored
Merge pull request #23524 from rwestMSFT/rw-0802-includes-linux
[Bulk] INCLUDE file maintenance: Linux include files
2 parents 4c048db + e8c5eb4 commit ad821c5

20 files changed

Lines changed: 47 additions & 72 deletions

docs/includes/applies-to-version/sql-on-linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ ms.date: 3/10/2021
66
ms.author: v-tdzakhov
77
---
88

9-
![Yes](../media/yes-icon.png)[!INCLUDE [sqlonlinux_md](../sqlonlinux_md.md)]
9+
![Yes](../media/yes-icon.png)[!INCLUDE [sqlonlinux-md](../sqlonlinux-md.md)]

docs/includes/linux-supported-platforms-2019.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/includes/sql-linux-quickstart-connect-query.md renamed to docs/includes/linux/sql-linux-quickstart-connect-query.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ The following steps use **sqlcmd** to locally connect to your new SQL Server ins
2222

2323
1. If successful, you should get to a **sqlcmd** command prompt: `1>`.
2424

25-
1. If you get a connection failure, first attempt to diagnose the problem from the error message. Then review the [connection troubleshooting recommendations](../linux/sql-server-linux-troubleshooting-guide.md#connection).
25+
1. If you get a connection failure, first attempt to diagnose the problem from the error message. Then review the [connection troubleshooting recommendations](../../linux/sql-server-linux-troubleshooting-guide.md#connection).
2626

2727
## Create and query data
2828

2929
The following sections walk you through using **sqlcmd** to create a new database, add data, and run a simple query.
3030

31-
For more information about writing Transact-SQL statements and queries, see [Tutorial: Writing Transact-SQL Statements](../t-sql/tutorial-writing-transact-sql-statements.md).
31+
For more information about writing Transact-SQL statements and queries, see [Tutorial: Writing Transact-SQL Statements](../../t-sql/tutorial-writing-transact-sql-statements.md).
3232

3333
### Create a new database
3434

@@ -111,42 +111,42 @@ QUIT
111111

112112
## Performance best practices
113113

114-
After installing SQL Server on Linux, review the best practices for configuring Linux and SQL Server to improve performance for production scenarios. For more information, see [Performance best practices and configuration guidelines for SQL Server on Linux](../linux/sql-server-linux-performance-best-practices.md).
114+
After installing SQL Server on Linux, review the best practices for configuring Linux and SQL Server to improve performance for production scenarios. For more information, see [Performance best practices and configuration guidelines for SQL Server on Linux](../../linux/sql-server-linux-performance-best-practices.md).
115115

116116
## Cross-platform data tools
117117

118118
In addition to **sqlcmd**, you can use the following cross-platform tools to manage SQL Server:
119119

120120
| Tool | Description |
121121
| ---- | ----------- |
122-
| [Azure Data Studio](../azure-data-studio/index.yml) | A cross-platform GUI database management utility. |
123-
| [Visual Studio Code](../tools/visual-studio-code/sql-server-develop-use-vscode.md) | A cross-platform GUI code editor that run Transact-SQL statements with the mssql extension. |
124-
| [PowerShell Core](../linux/sql-server-linux-manage-powershell-core.md) | A cross-platform automation and configuration tool based on cmdlets. |
122+
| [Azure Data Studio](../../azure-data-studio/index.yml) | A cross-platform GUI database management utility. |
123+
| [Visual Studio Code](../../tools/visual-studio-code/sql-server-develop-use-vscode.md) | A cross-platform GUI code editor that run Transact-SQL statements with the mssql extension. |
124+
| [PowerShell Core](../../linux/sql-server-linux-manage-powershell-core.md) | A cross-platform automation and configuration tool based on cmdlets. |
125125
| [mssql-cli](https://github.com/dbcli/mssql-cli/tree/master/doc) | A cross-platform command-line interface for running Transact-SQL commands. |
126126

127127
## Connecting from Windows
128128

129129
SQL Server tools on Windows connect to SQL Server instances on Linux in the same way they would connect to any remote SQL Server instance.
130130

131-
If you have a Windows machine that can connect to your Linux machine, try the same steps in this topic from a Windows command-prompt running **sqlcmd**. You must use the target Linux machine name or IP address rather than `localhost`, and make sure that TCP port 1433 is open on the SQL Server machine. If you have any problems connecting from Windows, see [connection troubleshooting recommendations](../linux/sql-server-linux-troubleshooting-guide.md#connection).
131+
If you have a Windows machine that can connect to your Linux machine, try the same steps in this topic from a Windows command-prompt running **sqlcmd**. You must use the target Linux machine name or IP address rather than `localhost`, and make sure that TCP port 1433 is open on the SQL Server machine. If you have any problems connecting from Windows, see [connection troubleshooting recommendations](../../linux/sql-server-linux-troubleshooting-guide.md#connection).
132132

133133
For other tools that run on Windows but connect to SQL Server on Linux, see:
134134

135-
- [SQL Server Management Studio (SSMS)](../linux/sql-server-linux-manage-ssms.md)
136-
- [Windows PowerShell](../linux/sql-server-linux-manage-powershell.md)
137-
- [SQL Server Data Tools (SSDT)](../linux/sql-server-linux-develop-use-ssdt.md)
135+
- [SQL Server Management Studio (SSMS)](../../linux/sql-server-linux-manage-ssms.md)
136+
- [Windows PowerShell](../../linux/sql-server-linux-manage-powershell.md)
137+
- [SQL Server Data Tools (SSDT)](../../linux/sql-server-linux-develop-use-ssdt.md)
138138

139139
## Other deployment scenarios
140140

141141
For other installation scenarios, see the following resources:
142142

143-
- [Upgrade](../linux/sql-server-linux-setup.md#upgrade): Learn how to upgrade an existing installation of SQL Server on Linux
144-
- [Uninstall](../linux/sql-server-linux-setup.md#uninstall): Uninstall SQL Server on Linux
145-
- [Unattended install](../linux/sql-server-linux-setup.md#unattended): Learn how to script the installation without prompts
146-
- [Offline install](../linux/sql-server-linux-setup.md#offline): Learn how to manually download the packages for offline installation
143+
- [Upgrade](../../linux/sql-server-linux-setup.md#upgrade): Learn how to upgrade an existing installation of SQL Server on Linux
144+
- [Uninstall](../../linux/sql-server-linux-setup.md#uninstall): Uninstall SQL Server on Linux
145+
- [Unattended install](../../linux/sql-server-linux-setup.md#unattended): Learn how to script the installation without prompts
146+
- [Offline install](../../linux/sql-server-linux-setup.md#offline): Learn how to manually download the packages for offline installation
147147

148-
For answers to frequently asked questions, see the [SQL Server on Linux FAQ](../linux/sql-server-linux-faq.yml).
148+
For answers to frequently asked questions, see the [SQL Server on Linux FAQ](../../linux/sql-server-linux-faq.yml).
149149

150150
## Next steps
151151

152-
- [Explore the tutorials for SQL Server on Linux](../linux/sql-server-linux-migrate-restore-database.md).
152+
- [Explore the tutorials for SQL Server on Linux](../../linux/sql-server-linux-migrate-restore-database.md).

docs/includes/ss-linux-cluster-availability-group-create-post.md renamed to docs/includes/linux/ss-linux-cluster-availability-group-create-post.md

File renamed without changes.

docs/includes/ss-linux-cluster-availability-group-create-prereq.md renamed to docs/includes/linux/ss-linux-cluster-availability-group-create-prereq.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ Before you create the availability group, you need to:
5656

5757
Install SQL Server. The following links point to SQL Server installation instructions for various distributions:
5858

59-
- [Red Hat Enterprise Linux](../linux/quickstart-install-connect-red-hat.md)
60-
- [SUSE Linux Enterprise Server](../linux/quickstart-install-connect-suse.md)
61-
- [Ubuntu](../linux/quickstart-install-connect-ubuntu.md)
59+
- [Red Hat Enterprise Linux](../../linux/quickstart-install-connect-red-hat.md)
60+
- [SUSE Linux Enterprise Server](../../linux/quickstart-install-connect-suse.md)
61+
- [Ubuntu](../../linux/quickstart-install-connect-ubuntu.md)
6262

6363
## Enable Always On availability groups
6464

@@ -78,7 +78,7 @@ ALTER EVENT SESSION AlwaysOn_health ON SERVER WITH (STARTUP_STATE=ON);
7878
GO
7979
```
8080

81-
For more information about this XE session, see [Configure extended events for Always On availability groups](../database-engine/availability-groups/windows/always-on-extended-events.md).
81+
For more information about this XE session, see [Configure extended events for Always On availability groups](../../database-engine/availability-groups/windows/always-on-extended-events.md).
8282

8383
## Create a certificate
8484

@@ -169,4 +169,4 @@ The TCP port on the firewall must be open for the listener port.
169169
>
170170
> For the SQL Server 2017 release, the only authentication method supported for the database mirroring endpoint is `CERTIFICATE`. The `WINDOWS` option will be enabled in a future release.
171171
172-
For more information, see [The database mirroring endpoint (SQL Server)](../database-engine/database-mirroring/the-database-mirroring-endpoint-sql-server.md).
172+
For more information, see [The database mirroring endpoint (SQL Server)](../../database-engine/database-mirroring/the-database-mirroring-endpoint-sql-server.md).

docs/includes/ss-linux-cluster-pacemaker-concepts.md renamed to docs/includes/linux/ss-linux-cluster-pacemaker-concepts.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
## <a name="pacemakerNotify"></a>Understand SQL Server resource agent for pacemaker
22

3-
Before the CTP 1.4 release, the Pacemaker resource agent for availability groups could not know if a replica marked as `SYNCHRONOUS_COMMIT` was really up-to-date or not. It was possible that the replica had stopped synchronizing with the primary but was not aware. Thus the agent could promote an out-of-date replica to primary - which, if successful, would cause data loss.
4-
5-
SQL Server 2017 CTP 1.4 added `sequence_number` to `sys.availability_groups` to solve this issue. `sequence_number` is a monotonically increasing BIGINT that represents how up-to-date the local availability group replica is with respect to the rest of the replicas in the availability group. Performing failovers, adding or removing replicas, and other availability group operations update this number. The number is updated on the primary, then pushed to secondary replicas. Thus a secondary replica that is up-to-date will have the same sequence_number as the primary.
3+
SQL Server 2017 introduced `sequence_number` to `sys.availability_groups` to show if a replica marked as `SYNCHRONOUS_COMMIT` was up to date. `sequence_number` is a monotonically increasing BIGINT that represents how up-to-date the local availability group replica is with respect to the rest of the replicas in the availability group. Performing failovers, adding or removing replicas, and other availability group operations update this number. The number is updated on the primary, then pushed to secondary replicas. Thus a secondary replica that is up-to-date will have the same sequence_number as the primary.
64

75
When Pacemaker decides to promote a replica to primary, it first sends a notification to all replicas to extract the sequence number and store it (we call this the pre-promote notification). Next, when Pacemaker actually tries to promote a replica to primary, the replica only promotes itself if its sequence number is the highest of all the sequence numbers from all replicas and rejects the promote operation otherwise. In this way only the replica with the highest sequence number can be promoted to primary, ensuring no data loss.
86

9-
Note that this is only guaranteed to work as long as at least one replica available for promotion has the same sequence number as the previous primary. To ensure this, the default behavior is for the Pacemaker resource agent to automatically set `REQUIRED_COPIES_TO_COMMIT` such that at least one synchronous commit secondary replica is up to date and available to be the target of an automatic failover. With each monitoring action, the value of `REQUIRED_COPIES_TO_COMMIT` is computed (and updated if necessary) as ('number of synchronous commit replicas' / 2). Then, at failover time, the resource agent will require (`total number of replicas` - `required_copies_to_commit` replicas) to respond to the pre-promote notification to be able to promote one of them to primary. The replica with the highest `sequence_number` will be promoted to primary.
7+
This is only guaranteed to work as long as at least one replica available for promotion has the same sequence number as the previous primary. To ensure this, the default behavior is for the Pacemaker resource agent to automatically set `REQUIRED_COPIES_TO_COMMIT` such that at least one synchronous commit secondary replica is up to date and available to be the target of an automatic failover. With each monitoring action, the value of `REQUIRED_COPIES_TO_COMMIT` is computed (and updated if necessary) as ('number of synchronous commit replicas' / 2). Then, at failover time, the resource agent will require (`total number of replicas` - `required_copies_to_commit` replicas) to respond to the pre-promote notification to be able to promote one of them to primary. The replica with the highest `sequence_number` will be promoted to primary.
108

119
For example, let's consider the case of an availability group with three synchronous replicas - one primary replica and two synchronous commit secondary replicas.
1210

1311
- `REQUIRED_COPIES_TO_COMMIT` is 3 / 2 = 1
1412

15-
- The required number of replicas to respond to pre-promote action is 3 - 1 = 2. So 2 replicas have to be up for the failover to be triggered. This means that, in the case of primary outage, if one of the secondary replicas is unresponsive and only one of the secondaries responds to the pre-promote action, the resource agent cannot guarantee that the secondary that responded has the highest sequence_number, and a failover is not triggered.
13+
- The required number of replicas to respond to pre-promote action is 3 - 1 = 2. So 2 replicas have to be up for the failover to be triggered. This means that, in the case of primary outage, if one of the secondary replicas is unresponsive and only one of the secondaries responds to the pre-promote action, the resource agent can't guarantee that the secondary that responded has the highest sequence_number, and a failover isn't triggered.
1614

1715
A user can choose to override the default behavior, and configure the availability group resource to not set `REQUIRED_COPIES_TO_COMMIT` automatically as above.
1816

docs/includes/ss-linux-cluster-pacemaker-configure-rhel.md renamed to docs/includes/linux/ss-linux-cluster-pacemaker-configure-rhel.md

File renamed without changes.

docs/includes/ss-linux-cluster-pacemaker-create-login.md renamed to docs/includes/linux/ss-linux-cluster-pacemaker-create-login.md

File renamed without changes.

docs/includes/ss-linux-cluster-required-synchronized-secondaries-default.md renamed to docs/includes/linux/ss-linux-cluster-required-synchronized-secondaries-default.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
> [!NOTE]
2-
> When you create the resource, and periodically afterwards, the Pacemaker resource agent automatically sets the value of `REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT` on the availability group based on the availability group's configuration. For example, if the availability group has three synchronous replicas, the agent will set `REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT` to `1`. For details and additional configuration options, see [High availability and data protection for availability group configurations](../linux/sql-server-linux-availability-group-ha.md).
1+
> [!NOTE]
2+
> When you create the resource, and periodically afterwards, the Pacemaker resource agent automatically sets the value of `REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT` on the availability group based on the availability group's configuration. For example, if the availability group has three synchronous replicas, the agent will set `REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT` to `1`. For details and additional configuration options, see [High availability and data protection for availability group configurations](../../linux/sql-server-linux-availability-group-ha.md).
File renamed without changes.

0 commit comments

Comments
 (0)