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/sql-server-linux-availability-group-cross-platform.md
+28-9Lines changed: 28 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,9 @@ In this scenario, two servers are on different operating systems. A Windows Serv
34
34
35
35
The steps to create the AG are the same as the steps to create an AG for read-scale workloads. The AG cluster type is NONE, because there is no cluster manager.
36
36
37
+
>[!NOTE]
38
+
>For the scripts in this article, angle brackets `<` and `>` identify values that you need to replace for your environment. The angle brackets themselves are not required for the scripts.
39
+
37
40
1. Install SQL Server 2017 on Windows Server 2016 and enable Availability Groups from SQL Server Configuration Manager.
@@ -61,13 +64,6 @@ The steps to create the AG are the same as the steps to create an AG for read-sc
61
64
62
65
1. Open up firewall ports for TPC 1433 and 5022 on both Windows and Linux.
63
66
64
-
1. Create a database for the AG. The example steps use a database named `<TestDB>`.
65
-
66
-
>[!NOTE]
67
-
>For the scripts in this article, angle brackets `<` and `>` identify values that you need to replace for your environment. The angle brackets themselves are not required for the scripts.
68
-
69
-
1. Take a full backup of the database.
70
-
71
67
1. On the primary replica, create a database login and password.
72
68
73
69
```sql
@@ -173,7 +169,6 @@ The steps to create the AG are the same as the steps to create an AG for read-sc
173
169
>[!NOTE]
174
170
>The preceding script uses `SEEDING_MODE = AUTOMATIC` to create the AG. SQL Server 2017 introduces support for automatic seeding in an availability group even if the disk layout is different. This capability supports cross-platform availability groups. For more information, see [Automatic Seeding - Disk Layout](../database-engine/availability-groups/windows/automatic-seeding-secondary-replicas.md#disklayout).
175
171
176
-
177
172
1. On the secondary replica, join the AG.
178
173
179
174
```sql
@@ -182,7 +177,31 @@ The steps to create the AG are the same as the steps to create an AG for read-sc
182
177
GO
183
178
```
184
179
185
-
1. On the primary replica, run the SQL query to add the db to the AG.
180
+
1. Create a database for the AG. The example steps use a database named `<TestDB>`.
181
+
182
+
>[!IMPORTANT]
183
+
>If you are using Azure Virtual Machines, the Windows Server places the data files on `F:\Data\` and the log files on `F:\Log`. For automatic seeding to work, place both data an log files in the same directory.
184
+
185
+
The following command creates a database and places the data and log files in the `F:\Data\` directory. Before you run the command, replace the database name, and database file names. Also, verify that the file path exists on the primary replica server.
1. Take a full backup of the database. If you don't need to store a full backup at this time, you can back up the database to `NUL:` This does not create a backup file. The following command backs up the database to `NUL:`:
199
+
200
+
```sql
201
+
BACKUP DATABASE <TestDB> TO DISK = N'NUL:'
202
+
```
203
+
204
+
1. On the primary replica, run the SQL query to add the database to the AG.
186
205
187
206
```sql
188
207
ALTER AVAILABILITY GROUP [ag1] ADD DATABASE <TestDB>
0 commit comments