Skip to content

Commit bfd3933

Browse files
committed
Update Linux articles with dates from 2018 and 2019
1 parent 844d63c commit bfd3933

20 files changed

Lines changed: 827 additions & 750 deletions
Binary file not shown.
89.7 KB
Loading

docs/linux/sample-unattended-install-redhat.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Use a sample bash script to install SQL Server on Red Hat Enterpris
55
author: rwestMSFT
66
ms.author: randolphwest
77
ms.reviewer: armaha
8-
ms.date: 05/20/2022
8+
ms.date: 11/16/2023
99
ms.service: sql
1010
ms.subservice: linux
1111
ms.topic: conceptual
@@ -19,7 +19,7 @@ ms.custom:
1919
This sample bash script installs [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Red Hat Enterprise Linux (RHEL) without interactive input. It provides examples of installing the [!INCLUDE [ssde-md](../includes/ssde-md.md)], the SQL Server command-line tools, SQL Server Agent, and performs post-install steps. You can optionally install full-text search and create an administrative user.
2020

2121
> [!TIP]
22-
> If you don't need an unattended installation script, the fastest way to install SQL Server is to follow the [quickstart for Red Hat](quickstart-install-connect-red-hat.md). For other setup information, see [Installation guidance for SQL Server on Linux](sql-server-linux-setup.md).
22+
> If you don't need an unattended installation script, the fastest way to install SQL Server is to follow the [Quickstart: Install SQL Server and create a database on Red Hat](quickstart-install-connect-red-hat.md). For other setup information, see [Installation guidance for SQL Server on Linux](sql-server-linux-setup.md).
2323
2424
## Prerequisites
2525

@@ -224,4 +224,4 @@ Then run the bash script as follows:
224224

225225
## Related content
226226

227-
- [SQL Server on Linux overview](sql-server-linux-overview.md)
227+
- [What is SQL Server on Linux?](sql-server-linux-overview.md)

docs/linux/sql-server-linux-availability-group-operate-ha.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article describes how to perform a rolling upgrade with SQL Se
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: vanto
7-
ms.date: 03/01/2018
7+
ms.date: 11/16/2023
88
ms.service: sql
99
ms.subservice: linux
1010
ms.topic: conceptual
@@ -17,23 +17,23 @@ ms.custom:
1717

1818
## Upgrade availability group
1919

20-
Before you upgrade an availability group, review the patterns and practices at [Upgrading availability group replica instances](../database-engine/availability-groups/windows/upgrading-always-on-availability-group-replica-instances.md).
20+
Before you upgrade an availability group, review the patterns and practices at [Upgrade availability group replicas](../database-engine/availability-groups/windows/upgrading-always-on-availability-group-replica-instances.md).
2121

22-
The following sections explain how to perform a rolling upgrade with SQL Server instances on Linux with availability groups.
22+
The following sections explain how to perform a rolling upgrade with SQL Server instances on Linux with availability groups.
2323

2424
### Upgrade steps on Linux
2525

2626
When availability group replicas are on instances of SQL Server in Linux, the cluster type of the availability group is either `EXTERNAL` or `NONE`. An availability group that is managed by a cluster manager besides Windows Server Failover Cluster (WSFC) is `EXTERNAL`. Pacemaker with Corosync is an example of an external cluster manager. An availability group with no cluster manager has cluster type `NONE` The upgrade steps outlined here are specific for availability groups of cluster type `EXTERNAL` or `NONE`.
2727

28-
The order in which you upgrade instances depends on if their role is secondary and whether or not they host synchronous or asynchronous replicas. Upgrade instances of SQL Server that host asynchronous secondary replicas first. Then upgrade instances that host synchronous secondary replicas.
28+
The order in which you upgrade instances depends on if their role is secondary and whether or not they host synchronous or asynchronous replicas. Upgrade instances of SQL Server that host asynchronous secondary replicas first. Then upgrade instances that host synchronous secondary replicas.
29+
30+
> [!NOTE]
31+
> If an availability group only has asynchronous replicas, to avoid any data loss change one replica to synchronous and wait until it's synchronized. Then upgrade this replica.
2932
30-
>[!NOTE]
31-
>If an availability group only has asynchronous replicas, to avoid any data loss change one replica to synchronous and wait until it is synchronized. Then upgrade this replica.
32-
3333
Before you begin, back up each database.
3434

3535
1. Stop the resource on the node hosting the secondary replica targeted for upgrade.
36-
36+
3737
Before running the upgrade command, stop the resource so the cluster will not monitor it and fail it unnecessarily. The following example adds a location constraint on the node that will result on the resource to be stopped. Update `ag_cluster-master` with the resource name and `nodeName1` with the node hosting the replica targeted for upgrade.
3838

3939
```bash
@@ -48,26 +48,28 @@ Before you begin, back up each database.
4848
sudo yum update mssql-server
4949
sudo yum update mssql-server-ha
5050
```
51+
5152
1. Remove the location constraint.
5253

5354
Before running the upgrade command, stop the resource so the cluster will not monitor it and fail it unnecessarily. The following example adds a location constraint on the node that will result on the resource to be stopped. Update `ag_cluster-master` with the resource name and `nodeName1` with the node hosting the replica targeted for upgrade.
5455

5556
```bash
5657
pcs constraint remove location-ag_cluster-master-rhel1--INFINITY
5758
```
59+
5860
As a best practice, ensure the resource is started (using `pcs status` command) and the secondary replica is connected and synchronized state after upgrade.
5961

6062
1. After all secondary replicas are upgraded, manually fail over to one of the synchronous secondary replicas.
6163

62-
For availability groups with `EXTERNAL` cluster type, use the cluster management tools to fail over; availability groups with `NONE` cluster type should use Transact-SQL to fail over.
64+
For availability groups with `EXTERNAL` cluster type, use the cluster management tools to fail over; availability groups with `NONE` cluster type should use Transact-SQL to fail over.
6365
The following example fails over an availability group with the cluster management tools. Replace `<targetReplicaName>` with the name of the synchronous secondary replica that will become primary:
6466

6567
```bash
66-
sudo pcs resource move ag_cluster-master <targetReplicaName> --master
67-
```
68-
69-
>[!IMPORTANT]
70-
>The following steps only apply to availability groups that do not have a cluster manager.
68+
sudo pcs resource move ag_cluster-master <targetReplicaName> --master
69+
```
70+
71+
> [!IMPORTANT]
72+
> The following steps only apply to availability groups that don't have a cluster manager.
7173
7274
If the availability group cluster type is `NONE`, manually fail over. Complete the following steps in order:
7375

@@ -94,7 +96,7 @@ Before you begin, back up each database.
9496
sudo yum update mssql-server
9597
sudo yum update mssql-server-ha
9698
```
97-
99+
98100
```bash
99101
# upgrade mssql-server and mssql-server-ha packages
100102
sudo yum update mssql-server
@@ -106,10 +108,10 @@ Before you begin, back up each database.
106108
pcs constraint remove location-ag_cluster-master-rhel1--INFINITY
107109
```
108110

109-
1. For an availability groups with an external cluster manager - where cluster type is EXTERNAL, clean up the location constraint that was caused by the manual failover.
111+
1. For an availability groups with an external cluster manager - where cluster type is EXTERNAL, clean up the location constraint that was caused by the manual failover.
110112

111113
```bash
112-
sudo pcs constraint remove cli-prefer-ag_cluster-master
114+
sudo pcs constraint remove cli-prefer-ag_cluster-master
113115
```
114116

115117
1. Resume data movement for the newly upgraded secondary replica - the former primary replica. This step is required when a higher version instance of SQL Server is transferring log blocks to a lower version instance in an availability group. Run the following command on the new secondary replica (the previous primary replica).
@@ -118,7 +120,7 @@ Before you begin, back up each database.
118120
ALTER DATABASE database_name SET HADR RESUME;
119121
```
120122

121-
After upgrading all servers, you can fail back. Fail over back to the original primary - if necessary.
123+
After upgrading all servers, you can fail back. Fail over back to the original primary - if necessary.
122124

123125
## Drop an availability group
124126

docs/linux/sql-server-linux-db-mail-sql-agent.md

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: DB Mail and Email Alerts with SQL Agent on Linux
33
description: Learn how to use DB Mail and how to set up Email Alerts with SQL Server Agent (mssql-server-agent) on Linux.
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: 02/20/2018
6+
ms.date: 11/16/2023
77
ms.service: sql
88
ms.subservice: linux
99
ms.topic: conceptual
@@ -14,78 +14,83 @@ ms.custom:
1414

1515
[!INCLUDE [SQL Server - Linux](../includes/applies-to-version/sql-linux.md)]
1616

17-
The following steps show you how to set up DB Mail and use it with SQL Server Agent (**mssql-server-agent**) on Linux.
17+
The following steps show you how to set up DB Mail and use it with SQL Server Agent (**mssql-server-agent**) on Linux.
1818

1919
## 1. Enable DB Mail
2020

2121
```sql
22-
USE master
23-
GO
24-
sp_configure 'show advanced options',1
25-
GO
26-
RECONFIGURE WITH OVERRIDE
27-
GO
28-
sp_configure 'Database Mail XPs', 1
29-
GO
30-
RECONFIGURE
31-
GO
22+
USE master
23+
GO
24+
sp_configure 'show advanced options',1
25+
GO
26+
RECONFIGURE WITH OVERRIDE
27+
GO
28+
sp_configure 'Database Mail XPs', 1
29+
GO
30+
RECONFIGURE
31+
GO
3232
```
3333

3434
## 2. Create a new account
35+
3536
```sql
36-
EXECUTE msdb.dbo.sysmail_add_account_sp
37-
@account_name = 'SQLAlerts',
38-
@description = 'Account for Automated DBA Notifications',
39-
@email_address = 'sqlagenttest@gmail.com',
40-
@replyto_address = 'sqlagenttest@gmail.com',
41-
@display_name = 'SQL Agent',
42-
@mailserver_name = 'smtp.gmail.com',
43-
@port = 587,
44-
@enable_ssl = 1,
45-
@username = 'sqlagenttest@gmail.com',
46-
@password = '<password>'
37+
EXECUTE msdb.dbo.sysmail_add_account_sp
38+
@account_name = 'SQLAlerts',
39+
@description = 'Account for Automated DBA Notifications',
40+
@email_address = 'sqlagenttest@gmail.com',
41+
@replyto_address = 'sqlagenttest@gmail.com',
42+
@display_name = 'SQL Agent',
43+
@mailserver_name = 'smtp.gmail.com',
44+
@port = 587,
45+
@enable_ssl = 1,
46+
@username = 'sqlagenttest@gmail.com',
47+
@password = '<password>'
4748
GO
4849
```
4950

5051
## 3. Create a default profile
5152

5253
```sql
53-
EXECUTE msdb.dbo.sysmail_add_profile_sp
54-
@profile_name = 'default',
55-
@description = 'Profile for sending Automated DBA Notifications'
54+
EXECUTE msdb.dbo.sysmail_add_profile_sp
55+
@profile_name = 'default',
56+
@description = 'Profile for sending Automated DBA Notifications'
5657
GO
5758
```
5859

5960
## 4. Add the Database Mail account to a Database Mail profile
61+
6062
```sql
61-
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
62-
@profile_name = 'default',
63-
@principal_name = 'public',
64-
@is_default = 1 ;
63+
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
64+
@profile_name = 'default',
65+
@principal_name = 'public',
66+
@is_default = 1 ;
6567
```
66-
67-
## 5. Add account to profile
68+
69+
## 5. Add account to profile
70+
6871
```sql
69-
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
70-
@profile_name = 'default',
71-
@account_name = 'SQLAlerts',
72-
@sequence_number = 1;
72+
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
73+
@profile_name = 'default',
74+
@account_name = 'SQLAlerts',
75+
@sequence_number = 1;
7376
```
74-
77+
7578
## 6. Send test email
76-
> [!NOTE]
79+
80+
> [!NOTE]
7781
> You might have to go to your email client and enable the "allow less secure clients to send mail." Not all clients recognize DB Mail as an email daemon.
7882
7983
```
80-
EXECUTE msdb.dbo.sp_send_dbmail
81-
@profile_name = 'default',
82-
@recipients = 'recipient-email@gmail.com',
83-
@Subject = 'Testing DBMail',
84-
@Body = 'This message is a test for DBMail'
84+
EXECUTE msdb.dbo.sp_send_dbmail
85+
@profile_name = 'default',
86+
@recipients = 'recipient-email@gmail.com',
87+
@Subject = 'Testing DBMail',
88+
@Body = 'This message is a test for DBMail'
8589
GO
8690
```
8791

8892
## 7. Set DB Mail Profile using mssql-conf or environment variable
93+
8994
You can use the mssql-conf utility or environment variables to register your DB Mail profile. In this case, let's call our profile default.
9095

9196
```bash
@@ -95,27 +100,27 @@ sudo /opt/mssql/bin/mssql-conf set sqlagent.databasemailprofile default
95100
MSSQL_AGENT_EMAIL_PROFILE=default
96101
```
97102

98-
## 8. Set up an operator for SQLAgent job notifications
103+
## 8. Set up an operator for SQLAgent job notifications
99104

100105
```sql
101-
EXEC msdb.dbo.sp_add_operator
102-
@name=N'JobAdmins',
103-
@enabled=1,
104-
@email_address=N'recipient-email@gmail.com',
105-
@category_name=N'[Uncategorized]'
106-
GO
106+
EXEC msdb.dbo.sp_add_operator
107+
@name=N'JobAdmins',
108+
@enabled=1,
109+
@email_address=N'recipient-email@gmail.com',
110+
@category_name=N'[Uncategorized]'
111+
GO
107112
```
108113

109-
## 9. Send email when 'Agent Test Job' succeeds
114+
## 9. Send email when 'Agent Test Job' succeeds
110115

111116
```
112-
EXEC msdb.dbo.sp_update_job
113-
@job_name='Agent Test Job',
114-
@notify_level_email=1,
115-
@notify_email_operator_name=N'JobAdmins'
117+
EXEC msdb.dbo.sp_update_job
118+
@job_name='Agent Test Job',
119+
@notify_level_email=1,
120+
@notify_email_operator_name=N'JobAdmins'
116121
GO
117122
```
118123

119124
## Related content
120125

121-
- [Run a SQL Server Agent job on Linux](sql-server-linux-run-sql-server-agent-job.md)
126+
- [Create and run SQL Server Agent jobs on Linux](sql-server-linux-run-sql-server-agent-job.md)

0 commit comments

Comments
 (0)