Press "Enter" to skip to content

Category: Cloud

Sending E-Mail via Azure Logic Apps

Maria Zakourdaev replaces Database Mail:

Azure SQL database is a fully managed relational database in the Microsoft cloud. It is a scalable, durable and performant database engine that allows developers to focus on the business logic without worrying about storage or server uptime. The main difference between SQL Server on premises and Azure SQL Database is that in Azure SQL Database only database level features are available. Features, like SQL Server Agent or SQL Server Mail are not supported by Azure SQL Database. However, in some situations we want to send an email from inside stored procedures. This post will show how to solve this challenge.

I’ve found Logic Apps to be surprisingly easy for this kind of thing, including connectors to outside mail services like Gmail. H/T Maria via Madeira Data’s blog.

Comments closed

Azure Purview Workflows in Public Preview

Victoria Holt makes note of an improvement to Purview:

Azure Purview Workflows moved to Public Preview 10 March.  This functionality enables customers to orchestrate the create, update and delete operations of data entities, have validation, and approval of these data entities using repeatable business processes.

The benefit of using Purview workflows is higher quality data, policy compliance, user collaboration, and change tracking awareness across the organization.

Read on for more information about how workflows currently work.

Comments closed

Running SQL Scripts on Snowflake from Azure Data Factory

Koen Verbeeck shows off the Script activity in Azure Data Factory:

Azure Data Factory has a new activity introduced this week (around the 10th of March 2022 for you future readers): the Script activity! This is not to be confused with the script task/component of SSIS, which allows you to execute .NET script (C# for most people, or VB if you’re Ben Weissman). No, this task executes SQL, so it’s more akin to the Execute SQL Task of SSIS.

Click through to see how it works while I lament the fact that SSIS never supported the best .NET language.

Comments closed

An Overview of Azure Redis Cache

Arun Sirpal lays out the use case of Azure Redis Cache:

Redis Cache is a well know caching technology and you can run it in Azure as a fully managed service. A common requirement (the most basic one) is doing a workflow like:

1. When an application needs to retrieve data, it will first search to see if it exists in Azure Cache for Redis.

2. If the data is found in Azure Cache for Redis (cache hit) use it

3. If the data is not found in Azure Cache for Redis (cache miss), then the application will need to retrieve the data from Azure SQL (or whatever cloud db back end you use)

4. For cache miss scenarios, the requesting application should add the data retrieved from the Azure Database to Azure Cache for Redis.

This is also known as the cache-aside pattern. If you’re feeling really cheeky, you can combine cache-aside with the decorator pattern to “hide” the cache in your code.

Comments closed

Managed Instance Link in Preview

Dani Ljepava announces support for Managed Instance link is now in public preview:

As of today, we are pleased to announce that the link feature for Managed Instance is available in the open public preview, in all Azure regions worldwide. It can be used with existing, or new managed instances, and SQL Server 2019 Enterprise, or Developer edition, including SQL Server 2022 CTP (available through EAP). We have also released the tooling support for the link in the form of automated wizards available in SQL Server Management Studio, starting from SSMS v18.11.1.

With the link, replicated databases from SQL Server on Managed Instance are usable as R/O secondary replicas. While the link is in operation, transactions commited on SQL Server (primary) are instantaneously committed to Managed Instance (secondary). This provides an exact replica of your SQL Server database on Managed Instance, synced near real-time. The link was built to be resilient, in case of the network being down, SQL Server being rebooted, or maintained, or in case of some other issue, the link will automatically resume replicating where it has left off when the issue has been resolved.

Support for 2019 is a shrewd idea, given the SQL Server version adoption curve for companies. This isn’t going to replace having a proper availability group for high availability or even (most) disaster recovery options, though, because the link is currently one-way—though Dani does mention eventual support for bi-directional operation with SQL Server 2022.

Comments closed

From Cosmos DB to the Serverless SQL Pool

Jovan Popovic shows off Synapse Link:

The serverless SQL pools enable you to implement near-real-time analytics solutions on top of your Cosmos DB data. Serverless SQL pools with the Synapse Link provide a cost-effective analytics solution for analyzing NoSQL data stored in Cosmos DB, which is not affecting or spending the resource units on your Cosmos DB transactional store. You can run heavy analytics on the serverless SQL pools that will not affect your workload or price of the main Cosmos DB transactional store. The serverless SQL pools enable you to use the T-SQL query language for analytics that enables you to connect the reporting & analytics tools (such as Power BI, Analytics Services) from a large ecosystem that works with SQL Server or Azure SQL database.

When you are integrating the serverless SQL pools in your solution, you need to apply some best practices. There are general best practices for the serverless SQL pools in the Synapse Analytics workspace, but some of these settings are not applicable to the Cosmos DB scenario. Probably you will use only a subset of the best practices that you can find here. In this post, you will find only the best practices that you should apply in the Cosmos DB solution and some additional hints that could help you to optimize your solution.

Click through to see how the process works and a few recommendations.

Comments closed

Materializing Views on Materialized Views

Drew Furgiuele is asking for it:

Consider this: you’ve developed a data ingestion strategy that is taking in remote thermostat readings. Usually, the devices report in on a set frequency and you’re able to calculate aggregate readings an hourly interval. A materialized view could be created that does this calculation and stores the results out for querying. But what if something causes some of this data to become duplicated? You’d first have to eliminate these duplicates, re-ingest the data, and then do your calculations again.

This is where we can leverage creating a materialized view over a materialized view. Our first materialized view will handle the deduplication, and our second can handle the aggregation of the deduplicated data.

Yo dawg, I heard you like materialized views, so I put some materialized views in your materialized views so you can materialize views while you materialize views.

Comments closed

Azure Functions and Azure SQL Database

Rajendra Gupta builds a simple Azure Function:

As a Platform as a Service (PaaS) service, Azure SQL Database enables developers to deploy SQL Database in Azure Cloud without managing the infrastructure. We use SQL Server Agent to schedule jobs to run at a specific schedule in an on-prem SQL instance. However, Azure DB does not have agent functionality.

There are multiple ways to schedule job or batch processes in the Cloud. You can explore the Azure automation series for executing scripts using Azure Logic apps and automation runbooks.

This article focuses on the Azure functions for scheduling a job for Azure SQL Database.

Read on for the process.

Comments closed

Azure SQL News

Anna Hoffman brings us tidings:

Emily Lisa kicked it off by telling us about the latest Azure SQL Database product updates including Azure SQL maintenance windowszone redundancy for SQL Hyperscale, and configurable backup storage redundancy for SQL Hyperscale.

Dani Ljepava from the Azure SQL Managed Instance product team came on to share a range of new features announced at SQL Bits now available in public preview: Link feature for Managed Instancedata virtualization with ADLSAdvanced notifications for planned eventsHybrid Service BrokerWindows authentication for Azure AD Principals, and the general availability of Maintenance windows. Watch the episode to see a special look at Link feature for Managed Instance!

Pam Lahoud also came on to talk about about the latest improvements that help you manage your SQL Server in Azure Virtual Machines, including the newly released SQL best practices assessment, all available to you by installing the free SQL IaaS Agent extension!

Read on for plenty more links and updates.

Comments closed