Lesson Learned #26: How to change the definition of table triggers at the same time

Today, we have been working a very interesting case, when our customer is migrating their database to Azure SQL Database. We have found an incompatibility issue, because all triggers have an error handler with this syntax: raiserror @errno @errmsg to inform the error happened, but, this syntax is not supported for Azure SQL Database. To fix this…


Lesson Learned #23: How to add AAD Security Groups to Azure SQL Database?

In these days, we are receiving multiples cases where our customer needs to add Azure SQL Database groups from Azure Active Directory. This is an example to how to archive it. Using the Portal in Azure: I created a user called SQLMember. I created a group called SQLGroup, adding the member SQLMember.   Using SQL…


Lesson Learned #16: How to change the default language of Azure SQL Database

Hello Everyone, We got several questions how is possible to change the default language using server level ( trough sp_configure ) or login definition.   Option 1: Change the default language using ‘sp_configure’  Unfortunately, there is not possible to configure a server level the default language , if you try to change it running EXEC sp_configure ‘default…


Lesson Learned #9: sp_execute_fanout was deprecated and replaced by sp_execute_remote

Within Cross-Database Queries we have the option to run a procedure using parameters using sp_execute_fanout. This execution could be a Transact-SQL statement on a single remote Azure SQL Database or set of databases serving as shards in a horizontal partitioning scheme. From time ago, if you try to execute sp_execute_fanout you will have an error that this…


Azure Support Academy (Spanish): SQL Server, Next Station Azure

Welcome to our session delivered in 24Hours Pass Virtual Chapter – Global Spanish, covering the main aspects to start or migrate from an OnPremise model  to one of the two architectures available in SQL Server on Azure, providing the keys to select the more suitable environment  for our requirements. Watch:  SQL Server, Next Station Azure We covered: Red…


Elastic Database Jobs: Sample for Running T-SQL Code in Multiple Databases

Introduction: After moving from on-premise SQL Server to Azure SQL Database, the SQL Server Agent service is no longer available to you. Administrators are therefore missing the ability to run recurring jobs, in order to execute T-SQL scripts and Stored Procedures on a schedule. Elastic Database Jobs are one way of implementing a scheduled execution on…


Does Azure SQL DB support automatic indexed views?

Are indexed views used automatically in SQL Azure without “WITH (NOEXPAND)”?How does it work?and How the query optimizer decides to use it or not ? The query optimizer uses indexed views to speed up the query execution. Which means SQL Server’s query optimizer realizes the precomputed sums of all the Quantity values for each value are…


Lesson Learned #4: Modifying the default time zone for your local time zone.

Currently, the default time zone on Azure SQL DB is UTC. Unfortunately, there is not possible to change by server configuration or database configuration. All Azure services use UTC time zone settings, regardless of their physical location. This also applies for SQL Azure, so if you need a custom time zone you’ll have to manage that in…