Skip to content

Commit 53a7bfe

Browse files
authored
Merge branch 'master' into dmc-links-202101-10
2 parents 4ab2f1c + 1c58bc7 commit 53a7bfe

13 files changed

Lines changed: 113 additions & 82 deletions

azure-sql/database/cost-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Azure SQL Database (with the exception of serverless) is billed on a predictable
6363

6464
### Using Monetary Credit with Azure SQL Database
6565

66-
You can pay for Azure SQL Database charges with your EA monetary commitment credit. However, you can't use EA monetary commitment credit to pay for charges for third party products and services including those from the Azure Marketplace.
66+
You can pay for Azure SQL Database charges with your Azure Prepayment (previously called monetary commitment) credit. However, you can't use Azure Prepayment credit to pay for charges for third party products and services including those from the Azure Marketplace.
6767

6868
## Review estimated costs in the Azure portal
6969

azure-sql/database/doc-changes-updates-release-notes.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ This table provides a quick comparison for the change in terminology:
7272
### SQL Managed Instance H2 2019 updates
7373

7474
- [Service-aided subnet configuration](https://azure.microsoft.com/updates/service-aided-subnet-configuration-for-managed-instance-in-azure-sql-database-available/) is a secure and convenient way to manage subnet configuration where you control data traffic while SQL Managed Instance ensures the uninterrupted flow of management traffic.
75-
- [Transparent data encryption (TDE) with Bring Your Own Key (BYOK)](https://azure.microsoft.com/updates/general-avilability-transparent-data-encryption-with-customer-managed-keys-for-azure-sql-database-managed-instance/) enables a bring-your-own-key (BYOK) scenario for data protection at rest and allows organizations to separate management duties for keys and data.
75+
- [Transparent Data Encryption (TDE) with Bring Your Own Key (BYOK)](https://azure.microsoft.com/updates/general-avilability-transparent-data-encryption-with-customer-managed-keys-for-azure-sql-database-managed-instance/) enables a bring-your-own-key (BYOK) scenario for data protection at rest and allows organizations to separate management duties for keys and data.
7676
- [Auto-failover groups](https://azure.microsoft.com/updates/azure-sql-database-auto-failover-groups-feature-now-available-in-all-regions/) enable you to replicate all databases from the primary instance to a secondary instance in another region.
7777
- [Global trace flags](https://azure.microsoft.com/updates/global-trace-flags-are-now-available-in-azure-sql-database-managed-instance/) allow you to configure SQL Managed Instance behavior.
7878

@@ -86,12 +86,13 @@ The following features are enabled in the SQL Managed Instance deployment model
8686
- Configure SQL Managed Instance to use [public endpoints](../managed-instance/public-endpoint-configure.md), [Proxy override](connectivity-architecture.md#connection-policy) connection to get better network performance, <a href="https://aka.ms/four-cores-sql-mi-update"> 4 vCores on Gen5 hardware generation</a> or <a href="/azure/azure-sql/database/automated-backups-overview">Configure backup retention up to 35 days</a> for point-in-time restore. [Long-term backup retention](long-term-retention-overview.md#sql-managed-instance-support) (up to 10 years) is currently in limited public preview.
8787
- New functionalities enable you to <a href="https://medium.com/@jocapc/geo-restore-your-databases-on-azure-sql-instances-1451480e90fa">geo-restore your database to another data center using PowerShell</a>, [rename database](https://azure.microsoft.com/updates/azure-sql-database-managed-instance-database-rename-is-supported/), [delete virtual cluster](../managed-instance/virtual-cluster-delete.md).
8888
- New built-in [Instance Contributor role](../../role-based-access-control/built-in-roles.md#sql-managed-instance-contributor) enables separation of duty (SoD) compliance with security principles and compliance with enterprise standards.
89-
- SQL Managed Instance is available in the following Azure Government regions to GA (US Gov Texas, US Gov Arizona) as well as in China North 2 and China East 2. It is also available in the following public regions: Australia Central, Australia Central 2, Brazil South, France South, UAE Central, UAE North, South Africa North, South Africa West.
89+
- SQL Managed Instance is available in the following Azure Government regions to GA (US Gov Texas, US Gov Arizona) and in China North 2 and China East 2. It is also available in the following public regions: Australia Central, Australia Central 2, Brazil South, France South, UAE Central, UAE North, South Africa North, South Africa West.
9090

9191
## Known issues
9292

9393
|Issue |Date discovered |Status |Date resolved |
9494
|---------|---------|---------|---------|
95+
|[Procedure sp_send_dbmail may transiently fail when @query parameter is used](#procedure-sp_send_dbmail-may-transiently-fail-when--parameter-is-used)|Jan 2021|Has Workaround||
9596
|[Distributed transactions can be executed after removing Managed Instance from Server Trust Group](#distributed-transactions-can-be-executed-after-removing-managed-instance-from-server-trust-group)|Oct 2020|Has Workaround||
9697
|[Distributed transactions cannot be executed after Managed Instance scaling operation](#distributed-transactions-cannot-be-executed-after-managed-instance-scaling-operation)|Oct 2020|Has Workaround||
9798
|[BULK INSERT](/sql/t-sql/statements/bulk-insert-transact-sql)/[OPENROWSET](/sql/t-sql/functions/openrowset-transact-sql?view=sql-server-ver15) in Azure SQL and `BACKUP`/`RESTORE` statement in Managed Instance cannot use Azure AD Manage Identity to authenticate to Azure storage|Sep 2020|Has Workaround||
@@ -109,7 +110,7 @@ The following features are enabled in the SQL Managed Instance deployment model
109110
|[Resource Governor on Business Critical service tier might need to be reconfigured after failover](#resource-governor-on-business-critical-service-tier-might-need-to-be-reconfigured-after-failover)|Sep 2019|Has Workaround||
110111
|[Cross-database Service Broker dialogs must be reinitialized after service tier upgrade](#cross-database-service-broker-dialogs-must-be-reinitialized-after-service-tier-upgrade)|Aug 2019|Has Workaround||
111112
|[Impersonation of Azure AD login types is not supported](#impersonation-of-azure-ad-login-types-is-not-supported)|Jul 2019|No Workaround||
112-
|[@query parameter not supported in sp_send_db_mail](#-parameter-not-supported-in-sp_send_db_mail)|Apr 2019|No Workaround||
113+
|[@query parameter not supported in sp_send_db_mail](#-parameter-not-supported-in-sp_send_db_mail)|Apr 2019|Resolved|Jan 2021|
113114
|[Transactional Replication must be reconfigured after geo-failover](#transactional-replication-must-be-reconfigured-after-geo-failover)|Mar 2019|No Workaround||
114115
|[Temporary database is used during RESTORE operation](#temporary-database-is-used-during-restore-operation)||Has Workaround||
115116
|[TEMPDB structure and content is re-created](#tempdb-structure-and-content-is-re-created)||No Workaround||
@@ -123,6 +124,29 @@ The following features are enabled in the SQL Managed Instance deployment model
123124
|Database mail feature with external (non-Azure) mail servers using secure connection||Resolved|Oct 2019|
124125
|Contained databases not supported in SQL Managed Instance||Resolved|Aug 2019|
125126

127+
### Procedure sp_send_dbmail may transiently fail when @query parameter is used
128+
129+
Procedure sp_send_dbmail may transiently fail when `@query` parameter is used. When this issue occurs, every second execution of procedure sp_send_dbmail fails with error `Msg 22050, Level 16, State 1` and message `Failed to initialize sqlcmd library with error number -2147467259`. To be able to see this error properly, the procedure should be called with default value 0 for the parameter `@exclude_query_output`, otherwise the error will not be propagated.
130+
This problem is caused by a known bug related to how sp_send_dbmail is using impersonation and connection pooling.
131+
To work around this issue wrap code for sending email into a retry logic that relies on output parameter `@mailitem_id`. If the execution fails, then parameter value will be NULL, indicating sp_send_dbmail should be called one more time to successfully send an email. Here is an example this retry logic.
132+
```sql
133+
CREATE PROCEDURE send_dbmail_with_retry AS
134+
BEGIN
135+
DECLARE @miid INT
136+
EXEC msdb.dbo.sp_send_dbmail
137+
@recipients = 'name@mail.com', @subject = 'Subject', @query = 'select * from dbo.test_table',
138+
@profile_name ='AzureManagedInstance_dbmail_profile', @execute_query_database = 'testdb',
139+
@mailitem_id = @miid OUTPUT
140+
141+
-- If sp_send_dbmail returned NULL @mailidem_id then retry sending email.
142+
--
143+
IF (@miid is NULL)
144+
EXEC msdb.dbo.sp_send_dbmail
145+
@recipients = 'name@mail.com', @subject = 'Subject', @query = 'select * from dbo.test_table',
146+
@profile_name ='AzureManagedInstance_dbmail_profile', @execute_query_database = 'testdb',
147+
END
148+
```
149+
126150
### Distributed transactions can be executed after removing Managed Instance from Server Trust Group
127151

128152
[Server Trust Groups](../managed-instance/server-trust-group-overview.md) are used to establish trust between Managed Instances that is prerequisite for executing [distributed transactions](./elastic-transactions-overview.md). After removing Managed Instance from Server Trust Group or deleting the group you still might be able to execute distributed transactions. There is a workaround you can apply to be sure that distributed transactions are disabled and that is [user-initiated manual failover](../managed-instance/user-initiated-failover.md) on Managed Instance.
@@ -150,7 +174,7 @@ BULK INSERT Sales.Invoices FROM 'inv-2017-12-08.csv' WITH (DATA_SOURCE = 'MyAzur
150174

151175
In some circumstances there might exist an issue with Service Principal used to access Azure AD and Azure Key Vault (AKV) services. As a result, this issue impacts usage of Azure AD authentication and Transparent Database Encryption (TDE) with SQL Managed Instance. This might be experienced as an intermittent connectivity issue, or not being able to run statements such are CREATE LOGIN/USER FROM EXTERNAL PROVIDER or EXECUTE AS LOGIN/USER. Setting up TDE with customer-managed key on a new Azure SQL Managed Instance might also not work in some circumstances.
152176

153-
**Workaround**: To prevent this issue from occurring on your SQL Managed Instance before executing any update commands, or in case you have already experienced this issue after update commands, go to Azure portal, access SQL Managed Instance [Active Directory admin blade](./authentication-aad-configure.md?tabs=azure-powershell#azure-portal). Verify if you can see the error message "Managed Instance needs a Service Principal to access Azure Active Directory. Click here to create a Service Principal”. In case you have encountered this error message, click on it, and follow the step by step instructions provided until this error have been resolved.
177+
**Workaround**: To prevent this issue from occurring on your SQL Managed Instance before executing any update commands, or in case you have already experienced this issue after update commands, go to Azure portal, access SQL Managed Instance [Active Directory admin blade](./authentication-aad-configure.md?tabs=azure-powershell#azure-portal). Verify if you can see the error message "Managed Instance needs a Service Principal to access Azure Active Directory. Click here to create a Service Principal”. In case you have encountered this error message, click on it, and follow the step-by-step instructions provided until this error have been resolved.
154178

155179
### Restoring manual backup without CHECKSUM might fail
156180

@@ -210,7 +234,7 @@ SQL Server and SQL Managed Instance [don't allow a user to drop a file that is n
210234

211235
Ongoing `RESTORE` statement, Data Migration Service migration process, and built-in point-in-time restore will block updating a service tier or resize of the existing instance and creating new instances until the restore process finishes.
212236

213-
The restore process will block these operations on the managed instances and instance pools in the same subnet where the restore process is running. The instances in instance pools are not affected. Create or change service tier operations will not fail or time-out. They will proceed once the restore process is completed or canceled.
237+
The restore process will block these operations on the managed instances and instance pools in the same subnet where the restore process is running. The instances in instance pools are not affected. Create or change service tier operations will not fail or time out. They will proceed once the restore process is completed or canceled.
214238

215239
**Workaround**: Wait until the restore process finishes, or cancel the restore process if the creation or update-service-tier operation has higher priority.
216240

azure-sql/database/elastic-jobs-tsql-create-manage.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ EXEC jobs.sp_add_target_group 'ServerGroup1'
5757
EXEC jobs.sp_add_target_group_member
5858
'ServerGroup1',
5959
@target_type = 'SqlServer',
60-
@refresh_credential_name='mymastercred', --credential required to refresh the databases in a server
61-
@server_name='server1.database.windows.net'
60+
@refresh_credential_name = 'mymastercred', --credential required to refresh the databases in a server
61+
@server_name = 'server1.database.windows.net'
6262

6363
--View the recently created target group and target group members
6464
SELECT * FROM jobs.target_groups WHERE target_group_name='ServerGroup1';
@@ -81,16 +81,16 @@ GO
8181
EXEC [jobs].sp_add_target_group_member
8282
@target_group_name = N'ServerGroup',
8383
@target_type = N'SqlServer',
84-
@refresh_credential_name=N'mymastercred', --credential required to refresh the databases in a server
85-
@server_name=N'London.database.windows.net'
84+
@refresh_credential_name = N'mymastercred', --credential required to refresh the databases in a server
85+
@server_name = N'London.database.windows.net'
8686
GO
8787

8888
-- Add a server target member
8989
EXEC [jobs].sp_add_target_group_member
9090
@target_group_name = N'ServerGroup',
9191
@target_type = N'SqlServer',
92-
@refresh_credential_name=N'mymastercred', --credential required to refresh the databases in a server
93-
@server_name='server2.database.windows.net'
92+
@refresh_credential_name = N'mymastercred', --credential required to refresh the databases in a server
93+
@server_name = 'server2.database.windows.net'
9494
GO
9595

9696
--Exclude a database target member from the server target group
@@ -99,7 +99,7 @@ EXEC [jobs].sp_add_target_group_member
9999
@membership_type = N'Exclude',
100100
@target_type = N'SqlDatabase',
101101
@server_name = N'server1.database.windows.net',
102-
@database_name =N'MappingDB'
102+
@database_name = N'MappingDB'
103103
GO
104104

105105
--View the recently created target group and target group members
@@ -122,9 +122,9 @@ EXEC jobs.sp_add_target_group 'PoolGroup'
122122
EXEC jobs.sp_add_target_group_member
123123
'PoolGroup',
124124
@target_type = 'SqlElasticPool',
125-
@refresh_credential_name='mymastercred', --credential required to refresh the databases in a server
126-
@server_name='server1.database.windows.net',
127-
@elastic_pool_name='ElasticPool-1'
125+
@refresh_credential_name = 'mymastercred', --credential required to refresh the databases in a server
126+
@server_name = 'server1.database.windows.net',
127+
@elastic_pool_name = 'ElasticPool-1'
128128

129129
-- View the recently created target group and target group members
130130
SELECT * FROM jobs.target_groups WHERE target_group_name = N'PoolGroup';
@@ -140,14 +140,14 @@ Connect to the [*job database*](job-automation-overview.md#job-database) and run
140140
--Connect to the job database specified when creating the job agent
141141

142142
--Add job for create table
143-
EXEC jobs.sp_add_job @job_name='CreateTableTest', @description='Create Table Test'
143+
EXEC jobs.sp_add_job @job_name = 'CreateTableTest', @description = 'Create Table Test'
144144

145145
-- Add job step for create table
146-
EXEC jobs.sp_add_jobstep @job_name='CreateTableTest',
147-
@command=N'IF NOT EXISTS (SELECT * FROM sys.tables WHERE object_id = object_id(''Test''))
146+
EXEC jobs.sp_add_jobstep @job_name = 'CreateTableTest',
147+
@command = N'IF NOT EXISTS (SELECT * FROM sys.tables WHERE object_id = object_id(''Test''))
148148
CREATE TABLE [dbo].[Test]([TestId] [int] NOT NULL);',
149-
@credential_name='myjobcred',
150-
@target_group_name='PoolGroup'
149+
@credential_name = 'myjobcred',
150+
@target_group_name = 'PoolGroup'
151151
```
152152

153153
## Data collection using built-in parameters
@@ -192,15 +192,15 @@ EXEC jobs.sp_add_job @job_name ='ResultsJob', @description='Collection Performan
192192

193193
-- Add a job step w/ schedule to collect results
194194
EXEC jobs.sp_add_jobstep
195-
@job_name='ResultsJob',
196-
@command= N' SELECT DB_NAME() DatabaseName, $(job_execution_id) AS job_execution_id, * FROM sys.dm_db_resource_stats WHERE end_time > DATEADD(mi, -20, GETDATE());',
197-
@credential_name='myjobcred',
198-
@target_group_name='PoolGroup',
199-
@output_type='SqlDatabase',
200-
@output_credential_name='myjobcred',
201-
@output_server_name='server1.database.windows.net',
202-
@output_database_name='<resultsdb>',
203-
@output_table_name='<resutlstable>'
195+
@job_name = 'ResultsJob',
196+
@command = N' SELECT DB_NAME() DatabaseName, $(job_execution_id) AS job_execution_id, * FROM sys.dm_db_resource_stats WHERE end_time > DATEADD(mi, -20, GETDATE());',
197+
@credential_name = 'myjobcred',
198+
@target_group_name = 'PoolGroup',
199+
@output_type = 'SqlDatabase',
200+
@output_credential_name = 'myjobcred',
201+
@output_server_name = 'server1.database.windows.net',
202+
@output_database_name = '<resultsdb>',
203+
@output_table_name = '<resutlstable>'
204204
Create a job to monitor pool performance
205205
--Connect to the job database specified when creating the job agent
206206

@@ -209,17 +209,17 @@ EXEC jobs.sp_add_target_group 'MasterGroup'
209209

210210
-- Add a server target member
211211
EXEC jobs.sp_add_target_group_member
212-
@target_group_name='MasterGroup',
213-
@target_type='SqlDatabase',
214-
@server_name='server1.database.windows.net',
215-
@database_name='master'
212+
@target_group_name = 'MasterGroup',
213+
@target_type = 'SqlDatabase',
214+
@server_name = 'server1.database.windows.net',
215+
@database_name = 'master'
216216

217217
-- Add a job to collect perf results
218218
EXEC jobs.sp_add_job
219-
@job_name='ResultsPoolsJob',
220-
@description='Demo: Collection Performance data from all pools',
221-
@schedule_interval_type='Minutes',
222-
@schedule_interval_count=15
219+
@job_name = 'ResultsPoolsJob',
220+
@description = 'Demo: Collection Performance data from all pools',
221+
@schedule_interval_type = 'Minutes',
222+
@schedule_interval_count = 15
223223

224224
-- Add a job step w/ schedule to collect results
225225
EXEC jobs.sp_add_jobstep
@@ -240,13 +240,13 @@ SELECT elastic_pool_name , end_time, elastic_pool_dtu_limit, avg_cpu_percent, av
240240
avg_storage_percent, elastic_pool_storage_limit_mb FROM sys.elastic_pool_resource_stats
241241
WHERE end_time > @poolStartTime and end_time <= @poolEndTime;
242242
'),
243-
@credential_name='myjobcred',
244-
@target_group_name='MasterGroup',
245-
@output_type='SqlDatabase',
246-
@output_credential_name='myjobcred',
247-
@output_server_name='server1.database.windows.net',
248-
@output_database_name='resultsdb',
249-
@output_table_name='resutlstable'
243+
@credential_name = 'myjobcred',
244+
@target_group_name = 'MasterGroup',
245+
@output_type = 'SqlDatabase',
246+
@output_credential_name = 'myjobcred',
247+
@output_server_name = 'server1.database.windows.net',
248+
@output_database_name = 'resultsdb',
249+
@output_table_name = 'resutlstable'
250250
```
251251

252252
## View job definitions
@@ -300,10 +300,10 @@ Connect to the [*job database*](job-automation-overview.md#job-database) and run
300300
--Connect to the job database specified when creating the job agent
301301

302302
EXEC jobs.sp_update_job
303-
@job_name='ResultsJob',
303+
@job_name = 'ResultsJob',
304304
@enabled=1,
305-
@schedule_interval_type='Minutes',
306-
@schedule_interval_count=15
305+
@schedule_interval_type = 'Minutes',
306+
@schedule_interval_count = 15
307307
```
308308

309309
## Monitor job execution status
@@ -1345,4 +1345,4 @@ Shows all members of all target groups.
13451345
## Next steps
13461346

13471347
- [Create and manage Elastic Jobs using PowerShell](elastic-jobs-powershell-create.md)
1348-
- [Authorization and Permissions](/dotnet/framework/data/adonet/sql/authorization-and-permissions-in-sql-server)
1348+
- [Authorization and Permissions](/dotnet/framework/data/adonet/sql/authorization-and-permissions-in-sql-server)

0 commit comments

Comments
 (0)