What's new in Azure SQL Database & SQL Managed Instance?

APPLIES TO: yesAzure SQL Database yesAzure SQL Managed Instance

This article lists Azure SQL Database and Azure SQL Managed Instance features that are currently in public preview. For SQL Database and SQL Managed Instance updates and improvements, see SQL Database & SQL Managed Instance service updates. For updates and improvements to other Azure services, see Service updates.

What's new?

Documentation for Azure SQL Database and Azure SQL Managed Instance has been split into separate sections. We've also updated how we refer to a managed instance from Azure SQL Database managed instance to Azure SQL Managed Instance.

We've done this because some features and functionality vary greatly between a single database and managed instance, and it's become increasingly more of a challenge to explain complex nuances between Azure SQL Database and Azure SQL Managed Instance in individual 'shared' articles.

This clarification between the different Azure SQL products should simplify and streamline the process of working with the SQL Server database engine in Azure, whether that be a single managed database in Azure SQL Database, a fully fledged managed instance hosting multiple databases in Azure SQL Managed Instance, or the familiar SQL Server product hosted on a virtual machine in Azure.

Consider that this is a work in progress and not every article has been updated yet. For example, documentation for Transact-SQL (T-SQL) statements, stored procedures, and many features shared between Azure SQL Database and Azure SQL Managed Instance are not yet complete, so we thank you for your patience as we continue clarifying the content.

This table provides a quick comparison for the change in terminology:

New term Previous term Explanation
Azure SQL Managed Instance Azure SQL Database managed instance Azure SQL Managed Instance is its own product within the Azure SQL family, rather than just a deployment option within Azure SQL Database.
Azure SQL Database Azure SQL Database single database Unless explicitly specified otherwise, the product name Azure SQL Database includes both single databases and databases deployed to an elastic pool.
Azure SQL Database Azure SQL Database elastic pool Unless explicitly specified otherwise, the product name Azure SQL Database includes both single databases and databases deployed to an elastic pool.
Azure SQL Database Azure SQL Database Though the term stays the same, it now only applies to single database and elastic pool deployments, and does not include managed instance.
Azure SQL N/A This refers to the family of SQL Server database engine products that are available in Azure: Azure SQL Database, Azure SQL Managed Instance, and SQL Server on Azure VMs.

Features in public preview

Feature Details
New Fsv2-series and M-series hardware generations For information, see Hardware generations.
Accelerated database recovery with single databases and elastic pools For information, see Accelerated Database Recovery.
Approximate Count Distinct For information, see Approximate Count Distinct.
Batch Mode on Rowstore (under compatibility level 150) For information, see Batch Mode on Rowstore.
Data discovery & classification For information, see Azure SQL Database and Azure Synapse Analytics data discovery & classification.
Elastic database jobs For information, see Create, configure, and manage elastic jobs.
Elastic queries For information, see Elastic query overview.
Elastic transactions Distributed transactions across cloud databases.
Memory Grant Feedback (Row Mode) (under compatibility level 150) For information, see Memory Grant Feedback (Row Mode).
Query editor in the Azure portal For information, see Use the Azure portal's SQL query editor to connect and query data.
R services / machine learning with single databases and elastic pools For information, see Machine Learning Services in Azure SQL Database.
SQL Analytics For information, see Azure SQL Analytics.
Table Variable Deferred Compilation (under compatibility level 150) For information, see Table Variable Deferred Compilation.
 

SQL Managed Instance - new features and known issues

SQL Managed Instance H2 2019 updates

SQL Managed Instance H1 2019 updates

The following features are enabled in SQL Managed Instance deployment model in H1 2019:

Known issues

Issue Date discovered Status Date resolved
Restoring manual backup without CHECKSUM might fail May 2020 Has Workaround
Agent becomes unresponsive upon modifying, disabling, or enabling existing jobs May 2020 Automatically mitigated
Permissions on resource group not applied to SQL Managed Instance Feb 2020 Has Workaround
Limitation of manual failover via portal for failover groups Jan 2020 Has Workaround
SQL Agent roles need explicit EXECUTE permissions for non-sysadmin logins Dec 2019 Has Workaround
SQL Agent jobs can be interrupted by Agent process restart Dec 2019 Resolved Mar 2020
AAD logins and users are not supported in SSDT Nov 2019 No Workaround
In-memory OLTP memory limits are not applied Oct 2019 Has Workaround
Wrong error returned while trying to remove a file that is not empty Oct 2019 Has Workaround
Change service tier and create instance operations are blocked by ongoing database restore Sep 2019 Has Workaround
Resource Governor on Business Critical service tier might need to be reconfigured after failover Sep 2019 Has Workaround
Cross-database Service Broker dialogs must be reinitialized after service tier upgrade Aug 2019 Has Workaround
Impersonification of Azure AD login types is not supported Jul 2019 No Workaround
@query parameter not supported in sp_send_db_mail Apr 2019 No Workaround
Transactional Replication must be reconfigured after geo-failover Mar 2019 No Workaround
Temporary database is used during RESTORE operation Has Workaround
TEMPDB structure and content is re-created No Workaround
Exceeding storage space with small database files Has Workaround
GUID values shown instead of database names Has Workaround
Error logs aren't persisted No Workaround
Transaction scope on two databases within the same instance isn't supported Has Workaround Mar 2020
CLR modules and linked servers sometimes can't reference a local IP address Has Workaround
Database consistency not verified using DBCC CHECKDB after restore database from Azure Blob Storage. Resolved Nov 2019
Point-in-time database restore from Business Critical tier to General Purpose tier will not succeed if source database contains in-memory OLTP objects. Resolved Oct 2019
Database Mail feature with external (non-Azure) mail servers using secure connection Resolved Oct 2019
Contained databases not supported in SQL Managed Instance Resolved Aug 2019

Restoring manual backup without CHECKSUM might fail

In certain circumstances manual backup of databases that was made on managed instance without CHECKSUM might fail to be restored. In such cases, please retry restoring the backup until successful.

Workaround: Take manual backups of databases on managed instance with CHECKSUM enabled.

Agent becomes unresponsive upon modifying, disabling, or enabling existing jobs

In certain circumstances modifying an existing job, disabling, or enabling it can cause the agent to become unresponsive. The issue is automatically mitigated upon detection resulting in restart of the agent process.

Permissions on resource group not applied to SQL Managed Instance

SQL Managed Instance Contributor RBAC role when applied to a resource group (RG) is not applied to SQL Managed Instance and has no effect.

Workaround: Setup SQL Managed Instance Contributor role for users at the subscription level.

Limitation of manual failover via portal for failover groups

If failover group spans across instances in different Azure subscriptions or resource groups, manual failover cannot be initiated from the primary instance in the failover group.

Workaround: Initiate failover via portal from the geo-secondary instance.

SQL Agent roles need explicit EXECUTE permissions for non-sysadmin logins

If non-sysadmin logins are added to any of SQL Agent fixed database roles, there exists an issue in which explicit EXECUTE permissions need to be granted to the master stored procedures for these logins to work. If this issue is encountered, the error message "The EXECUTE permission was denied on the object <object_name> (Microsoft SQL Server, Error: 229)" will be shown.

Workaround: Once you add logins to either of SQL Agent fixed database roles: SQLAgentUserRole, SQLAgentReaderRole or SQLAgentOperatorRole, for each of the logins added to these roles execute the below T-SQL script to explicitly grant EXECUTE permissions to the stored procedures listed.

USE [master]
GO
CREATE USER [login_name] FOR LOGIN [login_name]
GO
GRANT EXECUTE ON master.dbo.xp_sqlagent_enum_jobs TO [login_name]
GRANT EXECUTE ON master.dbo.xp_sqlagent_is_starting TO [login_name]
GRANT EXECUTE ON master.dbo.xp_sqlagent_notify TO [login_name]

SQL Agent jobs can be interrupted by Agent process restart

(Resolved in March 2020) SQL Agent creates a new session each time job is started, gradually increasing memory consumption. To avoid hitting the internal memory limit, which would block execution of scheduled jobs, Agent process will be restarted once its memory consumption reaches threshold. It may result in interrupting execution of jobs running at the moment of restart.

In-memory OLTP memory limits are not applied

Business Critical service-tier will not correctly apply max memory limits for memory-optimized objects in some cases. SQL Managed Instance may enable workload to use more memory for In-memory OLTP operations, which may affect availability and stability of the instance. In-memory OLTP queries that are reaching the limits might not fail immediately. This issue will be fixed soon. The queries that use more In-memory OLTP memory will fail sooner if they reach the limits.

Workaround: Monitor In-memory OLTP storage usage using SQL Server Management Studio to ensure that the workload is not using more than available memory. Increase the memory limits that depend on the number of vCores, or optimize your workload to use less memory.

Wrong error returned while trying to remove a file that is not empty

SQL Server/SQL Managed Instance don't allow user to drop a file that is not empty. If you try to remove a non-empty data file using ALTER DATABASE REMOVE FILE statement, the error Msg 5042 – The file '<file_name>' cannot be removed because it is not empty will not be immediately returned. SQL Managed Instance will keep trying to drop the file and the operation will fail after 30 min with Internal server error.

Workaround: Remove the content of the file using DBCC SHRINKFILE (N'<file_name>', EMPTYFILE) command. If this is the only file in the filegroup you would need to delete data from the table or partition associated to this filegroup before you shrink the file, and optionally load this data into another table/partition.

Change service tier and create instance operations are blocked by ongoing database restore

Ongoing RESTORE statement, Data Migration Service migration process, and built-in point-in time restore will block updating service tier or resize of the existing instance and creating new instances until restore process finishes. Restore process will block these operations on the Managed instances and instance pools in the same subnet where restore process is running. The instances in instance pools are not affected. Create or change service tier operations will not fail or timeout - they will proceed once the restore process is completed or canceled.

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

Resource Governor on Business Critical service tier might need to be reconfigured after failover

Resource Governor feature that enables you to limit the resources assigned to the user workload might incorrectly classify some user workload after failover or user-initiated change of service tier (for example, the change of max vCore or max instance storage size).

Workaround: Run ALTER RESOURCE GOVERNOR RECONFIGURE periodically or as part of SQL Agent Job that executes the SQL task when the instance starts if you are using Resource Governor.

Cross-database Service Broker dialogs must be reinitialized after service tier upgrade

Cross-database Service Broker dialogs will stop delivering the messages to the services in other databases after change service tier operation. The messages are not lost and they can be found in the sender queue. Any change of vCores or instance storage size in SQL Managed Instance, will cause service_broke_guid value in sys.databases view to be changed for all databases. Any DIALOG created using BEGIN DIALOG statement that references Service Brokers in other database will stop delivering messages to the target service.

Workaround: Stop any activity that uses cross-database Service Broker dialog conversations before updating service tier and reinitialize them after. If there are remaining messages that are undelivered after service tier change, read the messages from the source queue and resend them to the target queue.

Impersonification of Azure AD login types is not supported

Impersonation using EXECUTE AS USER or EXECUTE AS LOGIN of following AAD principals is not supported:

  • Aliased AAD users. The following error is returned in this case 15517.
  • AAD logins and users based on AAD applications or service principals. The following errors are returned in this case 15517 and 15406.

@query parameter not supported in sp_send_db_mail

The @query parameter in the sp_send_db_mail procedure doesn't work.

Transactional Replication must be reconfigured after geo-failover

If Transactional Replication is enabled on a database in an auto-failover group, the SQL Managed Instance administrator must clean up all publications on the old primary and reconfigure them on the new primary after a failover to another region occurs. See Replication for more details.

AAD logins and users are not supported in SSDT

SQL Server Data Tools don't fully support Azure Active directory logins and users.

Temporary database is used during RESTORE operation

When a database is restoring on SQL Managed Instance, the restore service will first create an empty database with the desired name to allocate the name on the instance. After some time, this database will be dropped and restoring of the actual database will be started. The database that is in Restoring state will temporary have a random GUID value instead of name. The temporary name will be changed to the desired name specified in RESTORE statement once the restore process completes. In the initial phase, user can access the empty database and even create tables or load data in this database. This temporary database will be dropped when the restore service starts the second phase.

Workaround: Do not access the database that you are restoring until you see that restore is completed.

TEMPDB structure and content is re-created

The tempdb database is always split into 12 data files and the file structure cannot be changed. The maximum size per file can't be changed, and new files cannot be added to tempdb. Tempdb is always re-created as an empty database when the instance starts or fails over, and any changes made in tempdb will not be preserved.

Exceeding storage space with small database files

CREATE DATABASE, ALTER DATABASE ADD FILE, and RESTORE DATABASE statements might fail because the instance can reach the Azure Storage limit.

Each General Purpose SQL Managed Instance has up to 35 TB of storage reserved for Azure Premium Disk space. Each database file is placed on a separate physical disk. Disk sizes can be 128 GB, 256 GB, 512 GB, 1 TB, or 4 TB. Unused space on the disk isn't charged, but the total sum of Azure Premium Disk sizes can't exceed 35 TB. In some cases, a SQL Managed Instance that doesn't need 8 TB in total might exceed the 35 TB Azure limit on storage size due to internal fragmentation.

For example, a General Purpose SQL Managed Instance might have one large file that's 1.2 TB in size placed on a 4-TB disk. It also might have 248 files with 1-GB size each that are placed on separate 128-GB disks. In this example:

  • The total allocated disk storage size is 1 x 4 TB + 248 x 128 GB = 35 TB.
  • The total reserved space for databases on the instance is 1 x 1.2 TB + 248 x 1 GB = 1.4 TB.

This example illustrates that under certain circumstances, due to a specific distribution of files, a SQL Managed Instance might reach the 35-TB limit that's reserved for an attached Azure Premium Disk when you might not expect it to.

In this example, existing databases continue to work and can grow without any problem as long as new files aren't added. New databases can't be created or restored because there isn't enough space for new disk drives, even if the total size of all databases doesn't reach the instance size limit. The error that's returned in that case isn't clear.

You can identify the number of remaining files by using system views. If you reach this limit, try to empty and delete some of the smaller files by using the DBCC SHRINKFILE statement or switch to the Business Critical tier, which doesn't have this limit.

GUID values shown instead of database names

Several system views, performance counters, error messages, XEvents, and error log entries display GUID database identifiers instead of the actual database names. Don't rely on these GUID identifiers because they're replaced with actual database names in the future.

Workaround: Use sys.databases view to resolve actual database name from the physical database name, specified in form of GUID database identifiers

SELECT name as ActualDatabaseName, physical_database_name as GUIDDatabaseIdentifier 
FROM sys.databases
WHERE database_id > 4

Error logs aren't persisted

Error logs that are available in SQL Managed Instance aren't persisted, and their size isn't included in the maximum storage limit. Error logs might be automatically erased if failover occurs. There might be gaps in the error log history because SQL Managed Instance was moved several times on several virtual machines.

Transaction scope on two databases within the same instance isn't supported

(Resolved in March 2020) The TransactionScope class in .NET doesn't work if two queries are sent to two databases within the same instance under the same transaction scope:

using (var scope = new TransactionScope())
{
    using (var conn1 = new SqlConnection("Server=quickstartbmi.neu15011648751ff.database.windows.net;Database=b;User ID=myuser;Password=mypassword;Encrypt=true"))
    {
        conn1.Open();
        SqlCommand cmd1 = conn1.CreateCommand();
        cmd1.CommandText = string.Format("insert into T1 values(1)");
        cmd1.ExecuteNonQuery();
    }

    using (var conn2 = new SqlConnection("Server=quickstartbmi.neu15011648751ff.database.windows.net;Database=b;User ID=myuser;Password=mypassword;Encrypt=true"))
    {
        conn2.Open();
        var cmd2 = conn2.CreateCommand();
        cmd2.CommandText = string.Format("insert into b.dbo.T2 values(2)");        cmd2.ExecuteNonQuery();
    }

    scope.Complete();
}

Workaround (not needed since March 2020): Use SqlConnection.ChangeDatabase(String) to use another database in a connection context instead of using two connections.

CLR modules and linked servers sometimes can't reference a local IP address

CLR modules placed in a SQL Managed Instance and linked servers or distributed queries that reference a current instance sometimes can't resolve the IP of a local instance. This error is a transient issue.

Workaround: Use context connections in a CLR module if possible.

Updates

For a list of SQL Database updates and improvements, see SQL Database service updates.

For updates and improvements to all Azure services, see Service updates.

Contribute to content

To contribute to the Azure SQL documentation, see the Docs Contributor Guide.