Skip to content

Commit c535417

Browse files
authored
Content freshness and link fixes (#36170)
2 parents e8d6d0d + f02da12 commit c535417

25 files changed

Lines changed: 2328 additions & 2107 deletions

azure-sql/database/elastic-scale-overview-split-and-merge.md

Lines changed: 36 additions & 36 deletions
Large diffs are not rendered by default.

azure-sql/database/elastic-transactions-overview.md

Lines changed: 29 additions & 28 deletions
Large diffs are not rendered by default.

azure-sql/database/hyperscale-named-replica-security-configure.md

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,42 @@
11
---
2-
title: Configure Hyperscale named replicas security to allow isolated access
2+
title: Configure Hyperscale Named Replicas Security to Allow Isolated Access
33
description: Learn the security considerations for configuring and managing Hyperscale named replicas so that a user can access the named replica but not other replicas.
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
6-
ms.reviewer: atsingh, vanto
7-
ms.date: 02/26/2024
6+
ms.reviewer: atsingh, vanto, randolphwest
7+
ms.date: 01/02/2026
88
ms.service: azure-sql-database
99
ms.subservice: scale-out
1010
ms.topic: how-to
1111
---
1212
# Configure isolated access for Hyperscale named replicas
13+
1314
[!INCLUDE [appliesto-sqldb](../includes/appliesto-sqldb.md)]
1415

15-
This article describes the procedure to grant access to an Azure SQL Database Hyperscale [named replica](service-tier-hyperscale-replicas.md) without granting access to the primary replica or other named replicas. This scenario allows resource and security isolation of a named replica - as the named replica will be running using its own compute node - and it is useful whenever isolated read-only access to an Azure SQL Hyperscale database is needed. Isolated, in this context, means that CPU and memory are not shared between the primary and the named replica, queries running on the named replica do not use compute resources of the primary or of any other replicas, and principals accessing the named replica cannot access other replicas, including the primary.
16+
This article describes the procedure to grant access to an Azure SQL Database Hyperscale [named replica](service-tier-hyperscale-replicas.md) without granting access to the primary replica or other named replicas. This scenario allows resource and security isolation of a named replica - as the named replica will be running using its own compute node - and it's useful whenever isolated read-only access to an Azure SQL Hyperscale database is needed. Isolated, in this context, means that CPU and memory aren't shared between the primary and the named replica, queries running on the named replica don't use compute resources of the primary or of any other replicas, and principals accessing the named replica can't access other replicas, including the primary.
1617

1718
[!INCLUDE [entra-id](../includes/entra-id.md)]
1819

19-
## <a id="create-a-login-in-the-master-database-on-the-primary-server"></a> Create a login on the primary server
20+
<a id="create-a-login-in-the-master-database-on-the-primary-server"></a>
21+
22+
## Create a login on the primary server
2023

2124
In the `master` database on the [logical server](logical-servers.md) hosting the *primary* database, execute the following to create a new login.
2225

2326
# [SQL authentication](#tab/SQL-Authentication)
2427

25-
Use your own strong and unique password, replacing `strong_password_here` with your strong password.
28+
Replace `<password>` with a [strong password](/sql/relational-databases/security/strong-passwords).
2629

2730
```sql
28-
CREATE LOGIN [third-party-login] WITH PASSWORD = 'strong_password_here';
31+
CREATE LOGIN [third-party-login]
32+
WITH PASSWORD = '<password>';
2933
```
3034

3135
# [Microsoft Entra authentication](#tab/AAD-Authentication)
3236

3337
```sql
34-
CREATE LOGIN [bob@contoso.com] FROM EXTERNAL PROVIDER;
38+
CREATE LOGIN [bob@contoso.com]
39+
FROM EXTERNAL PROVIDER;
3540
```
3641

3742
---
@@ -41,7 +46,9 @@ Retrieve the SID hexadecimal value for the created login from the `sys.sql_login
4146
# [SQL authentication](#tab/SQL-Authentication)
4247

4348
```sql
44-
SELECT SID FROM sys.sql_logins WHERE name = 'third-party-login';
49+
SELECT SID
50+
FROM sys.sql_logins
51+
WHERE name = 'third-party-login';
4552
```
4653

4754
# [Microsoft Entra authentication](#tab/AAD-Authentication)
@@ -66,21 +73,20 @@ ALTER LOGIN [bob@contoso.com] DISABLE;
6673

6774
---
6875

69-
7076
## Create a user in the primary read-write database
7177

72-
Once the login has been created, connect to the primary read-write replica of your database, for example WideWorldImporters (you can find a sample script to restore it here: [Restore Database in Azure SQL](https://github.com/yorek/azure-sql-db-samples/tree/master/samples/01-restore-database)) and create a database user for that login:
78+
Once the login has been created, connect to the primary read-write replica of your database. For example, restore `WideWorldImporters` with the details available in [Installation and configuration](/sql/samples/wide-world-importers-oltp-install-configure). Then, create a database user for that login:
7379

7480
# [SQL authentication](#tab/SQL-Authentication)
7581

7682
```sql
77-
CREATE USER [third-party-user] FROM LOGIN [third-party-login];
83+
CREATE USER [third-party-user] FOR LOGIN [third-party-login];
7884
```
7985

8086
# [Microsoft Entra authentication](#tab/AAD-Authentication)
8187

8288
```sql
83-
CREATE USER [bob@contoso.com] FROM LOGIN [bob@contoso.com];
89+
CREATE USER [bob@contoso.com] FOR LOGIN [bob@contoso.com];
8490
```
8591

8692
---
@@ -105,10 +111,10 @@ DROP LOGIN [bob@contoso.com];
105111

106112
Create a new Azure SQL logical server that to be used to isolate access to the named replica. Follow the instructions available at [Create and manage servers and single databases in Azure SQL Database](single-database-manage.md). To create a named replica, this server must be in the same Azure region as the server hosting the primary replica.
107113

108-
In the following sample, replace `strong_password_here` with your strong password. For example, using Azure CLI:
114+
Replace `<password>` with a strong password. For example, using Azure CLI:
109115

110116
```azurecli
111-
az sql server create -g MyResourceGroup -n MyNamedReplicaServer -l MyLocation --admin-user MyAdminUser --admin-password strong_password_here
117+
az sql server create -g MyResourceGroup -n MyNamedReplicaServer -l MyLocation --admin-user MyAdminUser --admin-password <password>
112118
```
113119

114120
Then, create a named replica for the primary database on this server. For example, using Azure CLI:
@@ -117,22 +123,25 @@ Then, create a named replica for the primary database on this server. For exampl
117123
az sql db replica create -g MyResourceGroup -n WideWorldImporters -s MyPrimaryServer --secondary-type Named --partner-database WideWorldImporters_NR --partner-server MyNamedReplicaServer
118124
```
119125

120-
## <a id="create-a-login-in-the-master-database-on-the-named-replica-server"></a> Create a login on the named replica server
126+
<a id="create-a-login-in-the-master-database-on-the-named-replica-server"></a>
127+
128+
## Create a login on the named replica server
121129

122130
# [SQL authentication](#tab/SQL-Authentication)
123131

124-
Connect to the `master` database on the logical server hosting the named replica, created in the previous step. Replace `strong_password_here` with your strong password. Add the login using the SID retrieved from the primary replica:
132+
Connect to the `master` database on the logical server hosting the named replica, created in the previous step. Replace `<password>` with a strong password. Add the login using the SID retrieved from the primary replica:
125133

126134
```sql
127-
CREATE LOGIN [third-party-login] WITH PASSWORD = 'strong_password_here', sid = 0x0...1234;
135+
CREATE LOGIN [third-party-login] WITH PASSWORD = '<password>', sid = 0x0...1234;
128136
```
129137

130138
# [Microsoft Entra authentication](#tab/AAD-Authentication)
131139

132140
Connect to the `master` database on the logical server hosting the named replica, created in the previous step and add the login.
133141

134142
```sql
135-
CREATE LOGIN [bob@contoso.com] FROM EXTERNAL PROVIDER;
143+
CREATE LOGIN [bob@contoso.com]
144+
FROM EXTERNAL PROVIDER;
136145
```
137146

138147
---
@@ -143,18 +152,20 @@ At this point, users and applications using `third-party-login` or `bob@contoso.
143152

144153
Once you have set up login authentication as described, you can use regular `GRANT`, `DENY` and `REVOKE` statements to manage authorization, or object-level permissions within the database. In these statements, reference the name of the user you created in the database, or a database role that includes this user as a member. Remember to execute these commands on the primary replica. The changes propagate to all secondary replicas, but they will only be effective on the named replica where the server-level login was created.
145154

146-
Remember that by default a newly created user has a minimal set of permissions granted (for example, it cannot access any user tables). If you want to allow `third-party-user` or `bob@contoso.com` to read data in a table, you need to explicitly grant the `SELECT` permission:
155+
Remember that by default a newly created user has a minimal set of permissions granted (for example, it can't access any user tables). If you want to allow `third-party-user` or `bob@contoso.com` to read data in a table, you need to explicitly grant the `SELECT` permission:
147156

148157
# [SQL authentication](#tab/SQL-Authentication)
149158

150159
```sql
151-
GRANT SELECT ON [Application].[Cities] to [third-party-user];
160+
GRANT SELECT
161+
ON [Application].[Cities] TO [third-party-user];
152162
```
153163

154164
# [Microsoft Entra authentication](#tab/AAD-Authentication)
155165

156166
```sql
157-
GRANT SELECT ON [Application].[Cities] to [bob@contoso.com];
167+
GRANT SELECT
168+
ON [Application].[Cities] TO [bob@contoso.com];
158169
```
159170

160171
---
@@ -163,29 +174,29 @@ As an alternative to granting permissions individually on every table, you can a
163174

164175
## Test access
165176

166-
You can test this configuration by using any client tool and attempt to connect to the primary and the named replica. For example, using `sqlcmd`, you can try to connect to the primary replica using the `third-party-login` user. Replace `strong_password_here` with your strong password.
177+
You can test this configuration by using any client tool and attempt to connect to the primary and the named replica. For example, using `sqlcmd`, you can try to connect to the primary replica using the `third-party-login` user. Replace `<password>` with a strong password.
167178

168179
```console
169-
sqlcmd -S MyPrimaryServer.database.windows.net -U third-party-login -P strong_password_here -d WideWorldImporters
180+
sqlcmd -S MyPrimaryServer.database.windows.net -U third-party-login -P <password> -d WideWorldImporters
170181
```
171182

172-
This will result in an error as the user is not allowed to connect to the server:
183+
This will result in an error as the user isn't allowed to connect to the server:
173184

174185
```output
175186
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login failed for user 'third-party-login'. Reason: The account is disabled.
176187
```
177188

178-
The attempt to connect to the named replica succeeds. Replace `strong_password_here` with your strong password.
189+
The attempt to connect to the named replica succeeds. Replace `<password>` with a strong password.
179190

180191
```console
181-
sqlcmd -S MyNamedReplicaServer.database.windows.net -U third-party-login -P strong_password_here -d WideWorldImporters_NR
192+
sqlcmd -S MyNamedReplicaServer.database.windows.net -U third-party-login -P <password> -d WideWorldImporters_NR
182193
```
183194

184195
No errors are returned, and queries can be executed on the named replica as allowed by granted object-level permissions.
185196

186197
## Related content
187198

188-
- Azure SQL logical Servers, see [What is a server in Azure SQL Database?](logical-servers.md)
189-
- Managing database access and logins, see [SQL Database security: Manage database access and login security](logins-create-manage.md).
190-
- Database engine permissions, see [Permissions](/sql/relational-databases/security/permissions-database-engine).
191-
- Granting object permissions, see [GRANT Object Permissions](/sql/t-sql/statements/grant-object-permissions-transact-sql).
199+
- [What is a logical server in Azure SQL Database and Azure Synapse?](logical-servers.md)
200+
- [Authorize database access to SQL Database, SQL Managed Instance, and Azure Synapse Analytics](logins-create-manage.md)
201+
- [Permissions (Database Engine)](/sql/relational-databases/security/permissions-database-engine)
202+
- [GRANT object permissions (Transact-SQL)](/sql/t-sql/statements/grant-object-permissions-transact-sql)

0 commit comments

Comments
 (0)