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: docs/linux/includes/change-docker-password.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
@@ -8,7 +8,7 @@ ms.topic: include
8
8
ms.custom:
9
9
- linux-related-content
10
10
---
11
-
The **SA** account is a system administrator on the SQL Server instance that's created during setup. After you create your SQL Server container, the `MSSQL_SA_PASSWORD` environment variable you specified is discoverable by running `echo $MSSQL_SA_PASSWORD` in the container. For security purposes, change your SA password:
11
+
The `SA` account is a system administrator on the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instance that's created during setup. After you create your [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] container, the `MSSQL_SA_PASSWORD` environment variable you specified is discoverable by running `echo $MSSQL_SA_PASSWORD` in the container. For security purposes, change your SA password:
12
12
13
13
1. Choose a strong password to use for the SA user.
Copy file name to clipboardExpand all lines: docs/linux/includes/cluster-availability-group-create-post.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.custom:
10
10
---
11
11
## Add a database to the availability group
12
12
13
-
Ensure that the database you add to the availability group is in the full recovery model and has a valid log backup. If this is a test database or a newly created database, take a database backup. On the primary SQL Server, run the following Transact-SQL script to create and back up a database called `db1`:
13
+
Ensure that the database you add to the availability group is in the full recovery model and has a valid log backup. If this is a test database or a newly created database, take a database backup. On the primary [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)], run the following Transact-SQL script to create and back up a database called `db1`:
14
14
15
15
```sql
16
16
CREATE DATABASE [db1];
@@ -19,15 +19,15 @@ BACKUP DATABASE [db1]
19
19
TO DISK = N'/var/opt/mssql/data/db1.bak';
20
20
```
21
21
22
-
On the primary SQL Server replica, run the following Transact-SQL script to add a database called `db1` to an availability group called `ag1`:
22
+
On the primary [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] replica, run the following Transact-SQL script to add a database called `db1` to an availability group called `ag1`:
23
23
24
24
```sql
25
25
ALTER AVAILABILITY GROUP [ag1] ADD DATABASE [db1];
26
26
```
27
27
28
28
### Verify that the database is created on the secondary servers
29
29
30
-
On each secondary SQL Server replica, run the following query to see if the `db1` database was created and is synchronized:
30
+
On each secondary [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] replica, run the following query to see if the `db1` database was created and is synchronized:
> On Linux, you must create an availability group before you add it as a cluster resource to be managed by the cluster. This document provides an example that creates the availability group. For distribution-specific instructions to create the cluster and add the availability group as a cluster resource, see the links under "Next steps."
18
+
On Linux, you must create an availability group before you add it as a cluster resource to be managed by the cluster. This document provides an example that creates the availability group.
21
19
22
20
1. Update the computer name for each host.
23
21
24
-
Each SQL Server name must be:
22
+
Each [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instance name must be:
25
23
26
-
- 15 characters or less.
24
+
- 15 characters or fewer.
27
25
- Unique within the network.
28
26
29
27
To set the computer name, edit `/etc/hostname`. The following script lets you edit `/etc/hostname` with **vi**:
@@ -32,11 +30,10 @@ Before you create the availability group, you need to:
32
30
sudo vi /etc/hostname
33
31
```
34
32
35
-
2. Configure the hosts file.
33
+
1. Configure the hosts file.
36
34
37
-
> [!NOTE]
38
-
>
39
-
> If hostnames are registered with their IP address in the DNS server, you don't need to do the following steps. Validate that all the nodes intended to be part of the availability group configuration can communicate with each other. (A ping to the hostname should reply with the corresponding IP address.) Also, make sure that the `/etc/hosts` file doesn't contain a record that maps the localhost IP address 127.0.0.1 with the hostname of the node.
35
+
> [!NOTE]
36
+
> If hostnames are registered with their IP address in the DNS server, you don't need to do the following steps. Validate that all the nodes intended to be part of the availability group configuration can communicate with each other. (A ping to the hostname should reply with the corresponding IP address.) Also, make sure that the `/etc/hosts` file doesn't contain a record that maps the localhost IP address 127.0.0.1 with the hostname of the node.
40
37
41
38
The hosts file on every server contains the IP addresses and names of all servers that will participate in the availability group.
42
39
@@ -54,7 +51,7 @@ Before you create the availability group, you need to:
54
51
55
52
The following example shows `/etc/hosts` on `node1` with additions for `node1`, `node2`, and `node3`. In this sample, `node1` refers to the server that hosts the primary replica, and `node2` and `node3` refer to servers that host the secondary replicas.
@@ -64,56 +61,56 @@ Before you create the availability group, you need to:
64
61
65
62
### Install SQL Server
66
63
67
-
Install SQL Server. The following links point to SQL Server installation instructions for various distributions:
64
+
Install [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)]. The following links point to [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] installation instructions for various distributions:
68
65
69
-
-[Red Hat Enterprise Linux](../quickstart-install-connect-red-hat.md)
70
-
-[SUSE Linux Enterprise Server](../quickstart-install-connect-suse.md)
-[Quickstart: Install SQL Server and create a database on Red Hat](../quickstart-install-connect-red-hat.md)
67
+
-[Quickstart: Install SQL Server and create a database on SUSE Linux Enterprise Server](../quickstart-install-connect-suse.md)
68
+
-[Quickstart: Install SQL Server and create a database on Ubuntu](../quickstart-install-connect-ubuntu.md)
72
69
73
70
## Enable Always On availability groups
74
71
75
-
Enable Always On availability groups for each node that hosts a SQL Server instance, and then restart `mssql-server`. Run the following script:
72
+
Enable Always On availability groups for each node that hosts a [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instance, and then restart `mssql-server`. Run the following script:
76
73
77
74
```bash
78
75
sudo /opt/mssql/bin/mssql-conf set hadr.hadrenabled 1
79
76
sudo systemctl restart mssql-server
80
77
```
81
78
82
-
## Enable an AlwaysOn_health event session
79
+
## Enable an AlwaysOn_health Event session
83
80
84
-
You can optionally enable extended events (XE) to help with root-cause diagnosis when you troubleshoot an availability group. Run the following command on each instance of SQL Server:
81
+
You can optionally enable Extended Events (XE) to help with root-cause diagnosis when you troubleshoot an availability group. Run the following command on each instance of [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)]:
85
82
86
83
```SQL
87
-
ALTER EVENT SESSION AlwaysOn_health ON SERVER WITH (STARTUP_STATE=ON);
84
+
ALTER EVENT SESSION AlwaysOn_health ON SERVER WITH (STARTUP_STATE=ON);
88
85
GO
89
86
```
90
87
91
-
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).
88
+
For more information about this XE session, see [Configure Extended Events for availability groups](../../database-engine/availability-groups/windows/always-on-extended-events.md).
92
89
93
90
## Create a certificate
94
91
95
-
The SQL Server service on Linux uses certificates to authenticate communication between the mirroring endpoints.
92
+
The [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] service on Linux uses certificates to authenticate communication between the mirroring endpoints.
96
93
97
-
The following Transact-SQL script creates a master key and a certificate. It then backs up the certificate and secures the file with a private key. Update the script with strong passwords. Connect to the primary SQL Server instance. To create the certificate, run the following Transact-SQL script:
94
+
The following Transact-SQL script creates a master key and a certificate. It then backs up the certificate and secures the file with a private key. Update the script with strong passwords. Connect to the primary [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instance. To create the certificate, run the following Transact-SQL script:
98
95
99
96
```SQL
100
-
CREATE MASTER KEY ENCRYPTION BY PASSWORD ='**<Master_Key_Password>**';
97
+
CREATE MASTER KEY ENCRYPTION BY PASSWORD ='<Master_Key_Password>';
101
98
CREATE CERTIFICATE dbm_certificate WITH SUBJECT ='dbm';
102
99
BACKUP CERTIFICATE dbm_certificate
103
-
TO FILE ='/var/opt/mssql/data/dbm_certificate.cer'
104
-
WITH PRIVATE KEY (
105
-
FILE ='/var/opt/mssql/data/dbm_certificate.pvk',
106
-
ENCRYPTION BY PASSWORD ='**<Private_Key_Password>**'
107
-
);
100
+
TO FILE ='/var/opt/mssql/data/dbm_certificate.cer'
101
+
WITH PRIVATE KEY (
102
+
FILE ='/var/opt/mssql/data/dbm_certificate.pvk',
103
+
ENCRYPTION BY PASSWORD ='<Private_Key_Password>'
104
+
);
108
105
```
109
106
110
-
At this point, your primary SQL Server replica has a certificate at `/var/opt/mssql/data/dbm_certificate.cer` and a private key at `var/opt/mssql/data/dbm_certificate.pvk`. Copy these two files to the same location on all servers that will host availability replicas. Use the mssql user, or give permission to the mssql user to access these files.
107
+
At this point, your primary [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] replica has a certificate at `/var/opt/mssql/data/dbm_certificate.cer` and a private key at `var/opt/mssql/data/dbm_certificate.pvk`. Copy these two files to the same location on all servers that will host availability replicas. Use the mssql user, or give permission to the mssql user to access these files.
111
108
112
-
For example, on the source server, the following command copies the files to the target machine. Replace the `**<node2>**` values with the names of the SQL Server instances that will host the replicas.
109
+
For example, on the source server, the following command copies the files to the target machine. Replace the `<node2>` values with the names of the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instances that will host the replicas.
The following Transact-SQL script creates a master key and a certificate from the backup that you created on the primary SQL Server replica. Update the script with strong passwords. The decryption password is the same password that you used to create the .pvk file in a previous step. To create the certificate, run the following script on all secondary servers:
125
+
The following Transact-SQL script creates a master key and a certificate from the backup that you created on the primary [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] replica. Update the script with strong passwords. The decryption password is the same password that you used to create the .pvk file in a previous step. To create the certificate, run the following script on all secondary servers:
129
126
130
127
```SQL
131
-
CREATE MASTER KEY ENCRYPTION BY PASSWORD ='**<Master_Key_Password>**';
128
+
CREATE MASTER KEY ENCRYPTION BY PASSWORD ='<Master_Key_Password>';
132
129
CREATE CERTIFICATE dbm_certificate
133
130
FROM FILE ='/var/opt/mssql/data/dbm_certificate.cer'
134
131
WITH PRIVATE KEY (
135
-
FILE ='/var/opt/mssql/data/dbm_certificate.pvk',
136
-
DECRYPTION BY PASSWORD ='**<Private_Key_Password>**'
137
-
);
132
+
FILE ='/var/opt/mssql/data/dbm_certificate.pvk',
133
+
DECRYPTION BY PASSWORD ='<Private_Key_Password>'
134
+
);
138
135
```
139
136
140
137
## Create the database mirroring endpoints on all replicas
141
138
142
-
Database mirroring endpoints use the Transmission Control Protocol (TCP) to send and receive messages between the server instances that participate in database mirroring sessions or host availability replicas. The database mirroring endpoint listens on a unique TCP port number.
139
+
Database mirroring endpoints use the Transmission Control Protocol (TCP) to send and receive messages between the server instances that participate in database mirroring sessions, or host availability replicas. The database mirroring endpoint listens on a unique TCP port number.
143
140
144
-
The following Transact-SQL script creates a listening endpoint named `Hadr_endpoint` for the availability group. It starts the endpoint and gives connection permission to the certificate that you created. Before you run the script, replace the values between `**< ... >**`. Optionally you can include an IP address `LISTENER_IP = (0.0.0.0)`. The listener IP address must be an IPv4 address. You can also use `0.0.0.0`.
141
+
The following Transact-SQL script creates a listening endpoint named `Hadr_endpoint` for the availability group. It starts the endpoint and gives connection permission to the certificate that you created. Before you run the script, replace the values between `< ... >`. Optionally you can include an IP address `LISTENER_IP = (0.0.0.0)`. The listener IP address must be an IPv4 address. You can also use `0.0.0.0`.
145
142
146
-
Update the following Transact-SQL script for your environment on all SQL Server instances:
143
+
Update the following Transact-SQL script for your environment on all [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instances:
147
144
148
145
```SQL
149
146
CREATE ENDPOINT [Hadr_endpoint]
150
-
AS TCP (LISTENER_PORT =**<5022>**)
147
+
AS TCP (LISTENER_PORT =5022)
151
148
FOR DATABASE_MIRRORING (
152
149
ROLE = ALL,
153
150
AUTHENTICATION = CERTIFICATE dbm_certificate,
154
151
ENCRYPTION = REQUIRED ALGORITHM AES
155
-
);
152
+
);
156
153
157
154
ALTER ENDPOINT [Hadr_endpoint] STATE = STARTED;
158
155
```
159
156
160
-
> [!NOTE]
157
+
> [!NOTE]
161
158
>
162
-
> If you use SQL Server Express Edition on one node to host a configuration-only replica, the only valid value for `ROLE` is `WITNESS`. Run the following script on SQL Server Express Edition:
159
+
> If you use [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] Express edition on one node to host a configuration-only replica, the only valid value for `ROLE` is `WITNESS`. Run the following script on [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] Express edition:
163
160
164
161
```SQL
165
162
CREATE ENDPOINT [Hadr_endpoint]
166
-
AS TCP (LISTENER_PORT =**<5022>**)
163
+
AS TCP (LISTENER_PORT =5022)
167
164
FOR DATABASE_MIRRORING (
168
165
ROLE = WITNESS,
169
166
AUTHENTICATION = CERTIFICATE dbm_certificate,
170
167
ENCRYPTION = REQUIRED ALGORITHM AES
171
-
);
168
+
);
172
169
173
170
ALTER ENDPOINT [Hadr_endpoint] STATE = STARTED;
174
171
```
175
172
176
173
The TCP port on the firewall must be open for the listener port.
177
174
178
-
> [!IMPORTANT]
179
-
>
180
-
> 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.
175
+
> [!IMPORTANT]
176
+
> For [!INCLUDE [sssql17-md](../../includes/sssql17-md.md)], the only authentication method supported for the database mirroring endpoint is `CERTIFICATE`. The `WINDOWS` option isn't available.
181
177
182
178
For more information, see [The database mirroring endpoint (SQL Server)](../../database-engine/database-mirroring/the-database-mirroring-endpoint-sql-server.md).
Copy file name to clipboardExpand all lines: docs/linux/includes/cluster-pacemaker-concepts.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ The following tables describe the outcome of an outage for primary or secondary
70
70
|`REQUIRED_COPIES_TO_COMMIT = 0`| User has to issue a manual `FAILOVER`.<br />Might have data loss.<br />New primary is R/W | Primary is R/W, running exposed to data loss. |
71
71
|`REQUIRED_COPIES_TO_COMMIT = 1` <sup>1</sup> | Cluster automatically issues `FAILOVER`<br />No data loss.<br />New primary rejects all connections until former primary recovers and joins availability group as secondary. | Primary rejects all connections until secondary recovers. |
72
72
73
-
<sup>1</sup> SQL Server resource agent for Pacemaker default behavior.
73
+
<sup>1</sup> [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] resource agent for Pacemaker default behavior.
74
74
75
75
### Availability group - three sync replicas
76
76
@@ -79,4 +79,4 @@ The following tables describe the outcome of an outage for primary or secondary
79
79
|`REQUIRED_COPIES_TO_COMMIT = 0`| User has to issue a manual `FAILOVER`.<br />Might have data loss.<br />New primary is R/W | Primary is R/W |
80
80
|`REQUIRED_COPIES_TO_COMMIT = 1` <sup>1</sup> | Cluster automatically issues `FAILOVER`.<br />No data loss.<br />New primary is RW | Primary is R/W |
81
81
82
-
<sup>1</sup> SQL Server resource agent for Pacemaker default behavior.
82
+
<sup>1</sup> [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] resource agent for Pacemaker default behavior.
Copy file name to clipboardExpand all lines: docs/linux/includes/cluster-pacemaker-configure-rhel.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
author: rwestMSFT
3
3
ms.author: randolphwest
4
-
ms.date: 09/15/2022
4
+
ms.date: 07/15/2024
5
5
ms.service: sql
6
6
ms.subservice: linux
7
7
ms.topic: include
@@ -15,10 +15,10 @@ ms.custom:
15
15
sudo firewall-cmd --reload
16
16
```
17
17
18
-
> If the firewall doesn't have a built-in high-availability configuration, open the following ports for Pacemaker.
19
-
>
20
-
> * TCP: Ports 2224, 3121, 21064
21
-
> * UDP: Port 5405
18
+
If the firewall doesn't have a built-in high-availability configuration, open the following ports for Pacemaker.
19
+
20
+
- TCP: Ports 2224, 3121, 21064
21
+
- UDP: Port 5405
22
22
23
23
1. Install Pacemaker packages on all nodes.
24
24
@@ -51,9 +51,9 @@ ms.custom:
51
51
sudo pcs cluster enable --all
52
52
```
53
53
54
-
**RHEL8**
54
+
**RHEL 8**
55
55
56
-
For RHEL 8, you will need to authenticate the nodes separately. Manually enter in the Username and Password for hacluster when prompted.
56
+
For RHEL 8, you need to authenticate the nodes separately. Manually enter in the Username and Password for hacluster when prompted.
57
57
58
58
```bash
59
59
sudo pcs host auth <node1><node2><node3>
@@ -65,7 +65,7 @@ ms.custom:
65
65
> [!NOTE]
66
66
> If you previously configured a cluster on the same nodes, you need to use `--force` option when running `pcs cluster setup`. This option is equivalent to running `pcs cluster destroy`. To re-enable Pacemaker, run `sudo systemctl enable pacemaker`.
67
67
68
-
1. Install SQL Server resource agent for SQL Server. Run the following commands on all nodes.
68
+
1. Install [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] resource agent for [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)]. Run the following commands on all nodes.
0 commit comments