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: articles/sql-database/sql-database-active-geo-replication.md
+73Lines changed: 73 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,79 @@ If you decide to create the secondary with lower compute size, the log IO percen
119
119
120
120
For more information on the SQL Database compute sizes, see [What are SQL Database Service Tiers](sql-database-purchase-models.md).
121
121
122
+
## Cross-subscription geo-replication
123
+
124
+
To setup active geo-replication between two databases belonging to different subscriptions (whether under the same tenant or not), you must follow the special procedure described in this section. The procedure is based on SQL commands and requires:
125
+
126
+
- Creating a privileged login on both servers
127
+
- Adding the IP address to the allow list of the client performing the change on both servers (such as the IP address of the host running SQL Server Management Studio).
128
+
129
+
The client performing the changes needs network access to the primary server. Although the same IP address of the client must be added to the allow list on the secondary server, network connectivity to the secondary server is not strictly required.
130
+
131
+
### On the master of the primary server
132
+
133
+
1. Add the IP address to the allow list of the client performing the changes (for more information see, [Configure firewall](sql-database-firewall-configure.md)).
134
+
1. Create a login dedicated to setup active geo-replication (and adjust the credentials as needed):
135
+
136
+
```sql
137
+
create login geodrsetup with password ='ComplexPassword01'
138
+
```
139
+
140
+
1. Create a corresponding user and assign it to the dbmanager role:
141
+
142
+
```sql
143
+
createusergeodrsetup for login gedrsetup
144
+
alter role geodrsetup dbmanager add member geodrsetup
145
+
```
146
+
147
+
1. Take note of the SID of the new login using this query:
148
+
149
+
```sql
150
+
select sid fromsys.sql_loginswhere name ='geodrsetup'
151
+
```
152
+
153
+
### On the source database on the primary server
154
+
155
+
1. Create a user for the same login:
156
+
157
+
```sql
158
+
createusergeodrsetup for login geodrsetup
159
+
```
160
+
161
+
1. Add the user to the db_owner role:
162
+
163
+
```sql
164
+
alter role db_owner add member geodrsetup
165
+
```
166
+
167
+
### On the master of the secondary server
168
+
169
+
1. Add the IP address to the allow list of the client performing the changes. It must the same exact IP address of the primary server.
170
+
1. Create the same login as on the primary server, using the same username password, and SID:
171
+
172
+
```sql
173
+
create login geodrsetup with password ='ComplexPassword01', sid=0x010600000000006400000000000000001C98F52B95D9C84BBBA8578FACE37C3E
174
+
```
175
+
176
+
1. Create a corresponding user and assign it to the dbmanager role:
177
+
178
+
```sql
179
+
createusergeodrsetup for login geodrsetup;
180
+
alter role dbmanager add member geodrsetup
181
+
```
182
+
183
+
### On the master of the primary server
184
+
185
+
1. Login to the master of the primary server using the new login.
186
+
1. Create a secondary replica of the source database on the secondary server (adjust database name and servername as needed):
187
+
188
+
```sql
189
+
alterdatabase dbrep add secondary on server <servername>
190
+
```
191
+
192
+
After the initial setup, the users, logins, and firewall rules created can be removed.
193
+
194
+
122
195
## Keeping credentials and firewall rules in sync
123
196
124
197
We recommend using [database-level IP firewall rules](sql-database-firewall-configure.md) for geo-replicated databases so these rules can be replicated with the database to ensure all secondary databases have the same IP firewall rules as the primary. This approach eliminates the need for customers to manually configure and maintain firewall rules on servers hosting both the primary and secondary databases. Similarly, using [contained database users](sql-database-manage-logins.md) for data access ensures both primary and secondary databases always have the same user credentials so during a failover, there is no disruptions due to mismatches with logins and passwords. With the addition of [Azure Active Directory](../active-directory/fundamentals/active-directory-whatis.md), customers can manage user access to both primary and secondary databases and eliminating the need for managing credentials in databases altogether.
Copy file name to clipboardExpand all lines: articles/sql-database/sql-database-scale-resources.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,8 @@ All three flavors of Azure SQL Database offer some ability to dynamically scale
50
50
- A [Managed Instance](sql-database-managed-instance.md) uses [vCores](sql-database-managed-instance.md#vcore-based-purchasing-model) mode and enables you to define maximum CPU cores and maximum of storage allocated to your instance. All databases within the instance will share the resources allocated to the instance.
51
51
-[Elastic pools](sql-database-elastic-pool-scale.md) enable you to define maximum resource limit per group of databases in the pool.
52
52
53
-
Initiating scale up or scale down action in any of the flavors would restart database engine process and move it to a different virtual machine if needed. Moving database engine process to a new virtual machine is **online process** where you can continue using your existing Azure SQL Database service while the process is in progress. Once the target database engine is fully initialized and ready to process the queries, the connections will be [switched from source to target database engine](sql-database-single-database-scale.md#impact-of-changing-service-tier-or-rescaling-compute-size).
53
+
Initiating scale up or scale down action in any of the flavors would restart database engine process and move it to a different virtual machine if needed. Moving database engine process to a new virtual machine is **online process** where you can continue using your existing Azure SQL Database service while the process is in progress. Once the target database engine is fully initialized and ready to process the queries, the connections will be [switched from source to target database engine](sql-database-single-database-scale.md#impact).
54
+
54
55
55
56
> [!NOTE]
56
57
> You can expect a short connection break when the scale up/scale down process is finished. If you have implemented [Retry logic for standard transient errors](sql-database-connectivity-issues.md#retry-logic-for-transient-errors), you will not notice the failover.
Copy file name to clipboardExpand all lines: articles/sql-database/sql-database-single-database-scale.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,6 @@ ms.date: 04/26/2019
16
16
17
17
This article describes how to scale the compute and storage resources available for an Azure SQL Database in the provisioned compute tier. Alternatively, the [serverless compute tier](sql-database-serverless.md) provides compute auto-scaling and bills per second for compute used.
18
18
19
-
## Change compute size (vCores or DTUs)
20
-
21
19
After initially picking the number of vCores or DTUs, you can scale a single database up or down dynamically based on actual experience using the [Azure portal](sql-database-single-databases-manage.md#manage-an-existing-sql-database-server), [Transact-SQL](https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql?view=azuresqldb-current#examples-1), [PowerShell](/powershell/module/az.sql/set-azsqldatabase), the [Azure CLI](/cli/azure/sql/db#az-sql-db-update), or the [REST API](https://docs.microsoft.com/rest/api/sql/databases/update).
22
20
23
21
The following video shows dynamically changing the service tier and compute size to increase available DTUs for a single database.
@@ -27,7 +25,7 @@ The following video shows dynamically changing the service tier and compute size
27
25
> [!IMPORTANT]
28
26
> Under some circumstances, you may need to shrink a database to reclaim unused space. For more information, see [Manage file space in Azure SQL Database](sql-database-file-space-management.md).
29
27
30
-
###Impact of changing service tier or rescaling compute size
28
+
## Impact
31
29
32
30
Changing the service tier or compute size of mainly involves the service performing the following steps:
33
31
@@ -42,7 +40,7 @@ Changing the service tier or compute size of mainly involves the service perform
42
40
> [!IMPORTANT]
43
41
> No data is lost during any step in the workflow. Make sure that you have implemented some [retry logic](sql-database-connectivity-issues.md) in the applications and components that are using Azure SQL Database while the service tier is changed.
44
42
45
-
###Latency of changing service tier or rescaling compute size
43
+
## Latency
46
44
47
45
The estimated latency to change the service tier or rescale the compute size of a single database or elastic pool is parameterized as follows:
48
46
@@ -55,7 +53,7 @@ The estimated latency to change the service tier or rescale the compute size of
55
53
> [!TIP]
56
54
> To monitor in-progress operations, see: [Manage operations using the SQL REST API](https://docs.microsoft.com/rest/api/sql/operations/list), [Manage operations using CLI](/cli/azure/sql/db/op), [Monitor operations using T-SQL](/sql/relational-databases/system-dynamic-management-views/sys-dm-operation-status-azure-sql-database) and these two PowerShell commands: [Get-AzSqlDatabaseActivity](/powershell/module/az.sql/get-azsqldatabaseactivity) and [Stop-AzSqlDatabaseActivity](/powershell/module/az.sql/stop-azsqldatabaseactivity).
57
55
58
-
###Cancelling service tier changes or compute rescaling operations
56
+
## Cancelling changes
59
57
60
58
A service tier change or compute rescaling operation can be canceled.
61
59
@@ -84,7 +82,7 @@ else {
84
82
}
85
83
```
86
84
87
-
###Additional considerations when changing service tier or rescaling compute size
85
+
## Additional considerations
88
86
89
87
- If you are upgrading to a higher service tier or compute size, the database max size does not increase unless you explicitly specify a larger size (maxsize).
90
88
- To downgrade a database, the database used space must be smaller than the maximum allowed size of the target service tier and compute size.
@@ -94,7 +92,7 @@ else {
94
92
- The restore service offerings are different for the various service tiers. If you are downgrading to the **Basic** tier, there is a lower backup retention period. See [Azure SQL Database Backups](sql-database-automated-backups.md).
95
93
- The new properties for the database are not applied until the changes are complete.
96
94
97
-
###Billing during compute rescaling
95
+
## Billing
98
96
99
97
You are billed for each hour a database exists using the highest service tier + compute size that applied during that hour, regardless of usage or whether the database was active for less than an hour. For example, if you create a single database and delete it five minutes later your bill reflects a charge for one database hour.
100
98
@@ -120,6 +118,10 @@ You are billed for each hour a database exists using the highest service tier +
120
118
> [!IMPORTANT]
121
119
> Under some circumstances, you may need to shrink a database to reclaim unused space. For more information, see [Manage file space in Azure SQL Database](sql-database-file-space-management.md).
122
120
121
+
### Geo-replicated database
122
+
123
+
To change the database size of a replicated secondary database, change the size of the primary database. This change will then be replicated and implemented on the secondary database as well.
124
+
123
125
## P11 and P15 constraints when max size greater than 1 TB
124
126
125
127
More than 1 TB of storage in the Premium tier is currently available in all regions except: China East, China North, Germany Central, Germany Northeast, West Central US, US DoD regions, and US Government Central. In these regions, the storage max in the Premium tier is limited to 1 TB. The following considerations and limitations apply to P11 and P15 databases with a maximum size greater than 1 TB:
0 commit comments