Skip to main content


Managed Instances - Closing the gap between Azure SQL Database and Azure VM with SQL Server

Recent posts

Flavors of SQL inside Azure (Azure SQL)

Just realized a few days ago that there are so many flavors of SQL inside Microsoft Azure that you need to be careful when you decide which one to use. In this post, I want to present the most important flavors of SQL that you can have inside Azure and to define a demarcation line between them.

1.0 SQL Server inside Azure VMs (IaaS)
The classical IaaS approach where customer needs to manage the VMs and the SQL Server instance that is running on top of Azure. The list of tasks that you need to do when you run your SQL instances on top of Azure VMs are the same as you would have the SQL Server instances inside your own data-centers. From license, to backup and restoration procedures, all of this needs to be managed by yourself.

2.0 SQL Database (PaaS)
The current offer of Azure related to SQL on the PaaS environment is more complex than you would expect. In this moment there are 3 options available, that cover most of the uses cases that you might have.
SQL Database (Singleton)Elastic Pool…

IoT Home Automation | Garage door proximity sensor

In the last post I added the extra functionality that would allow me to know when was the last time when the device was online and last time when a command was received by the device. Additional to this I added also a state of each device, even if I was not collecting the device state.
Now, it is the moment to add the state functionality to the garage doors (open/close)

The current system is simple, allowing us to trigger the garage door action, without being able to know if we close or open the door. This might create confusion especially when you control the doors from remote controls too.
By adding state functionality to the system, we would be able to know if the doors are open or close. On top of this we could also add actions like open/close the doors and the system could decide if the door is open or not and to close it.

The Beninca system that I have on the garage doors is not able to provide to us the doors state. It is just a simple door mechanism that is o…

Azure SQL Data Sync | Tips and Tricks

In this post we will talk about things that you should know and take into account when you want to use SQL Data Sync from/to Azure SQL.

What is SQL Data Sync
It’s a synchronization service offered around Azure platform that is allowing us out-of-the-box to synchronize multiple databases that can be inside Azure or on-premises. SQL Data Sync it is one of the services that makes our lives 10x time easier.
The coolest thing on this service is that you can make the configurations from Azure Portal. This is useful especially when you want to try the service or make a fast configuration. From UX perspective, the experience is wonderful and when you want to automate the process, you  can use PowerShell.

Base Concepts
Synchronization Group represents a groups of databases that you want to keep in sync. You’ll have all the time a Master database used to sync between all the other databases. In the Master-Slave topology, the Slaves are called Sync Members and  the master is called Hub.

For on-pre…

IoT Home Automation | Device tracking capabilities

In the last post, I talked about how I connected the yard gates to the IoT Home solution that I started to develop. Unfortunately, I was not able yet to connect the Paradox alarm system to the solution. It’s not clear for me how to connect the relay as a keyswitch zone, but I hope next weeks to receive some help and resolve the near future.

Because the WiFi connection is not stable, there are times when I lose the connection to the devices. This can be annoying, especially because I do not have yet a tracking mechanism that can provide me information related to the current device state.
I decided to enhance my solution with tracking capabilities. Until now I didn’t add any logs to the solution because I wanted to see exactly where and what kind of data I should collect. Easily you can add logs capabilities to the system and end up with a bunch of logs that you don't need it.

In day to day use I observed that I need the following information:

When was the last time when the…

Demystify how Shared Access Signature (SAS) is created inside Azure Storage

In this post, we will take a look on how Shared Access Signature (SAS) is generated. We would like to understand: How such a signature is generatedWhat are the inputs that are required for it What does the signature contains I assume that you have base the knowledge’s related to SAS. If not I would recommend to read the following introduction before -
What does the SAS signature token contains? This signature (token) is just a specific HMAC (keyed-hash message authentication code) generated using SHA256 hashing algorithm. There is no magic behind it. Inside this token all the relevant information related to access permissions, expiration date and many more are ‘hashed’. By ‘hashed’ I understand a hash that is generated from the string that contains in clear text all the information related to SAS together with storage account key. For example, for the below SAS string 1SAS String = sv=201…

IoT Home Automation | Connecting Yard Gates (Beninca and ESP8266 controller)

I continue the journey of home automation using ESP8266 and Arduino with yard gates. In the last post related on this topic, I have done the base automation of the garage doors.

From this perspective, nothing special. Except welding the pines of ESP8266 and relay and putting one of top each other I was done. I prefer to use relays shields that can be added one on top each other allowing you to mount the controller fast and without additional welding or wires.

Arduino Code
In theory, the code should be similar to the garage doors automations. The base idea was the same, using HTTP code to decide if we need to close or open a circuit controlled by the relay.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70#include <Arduino.h>#include <ESP8266WiFi.h>#include <ESP8266HTTPClient.h>#ifdef ESP8266extern"C&…