Skip to content

Hocine Mechara

Hocine Mechara has more than 5 years of experience in IT and specializes in SQL Server databases. His expertise includes installing and configuring SQL Server instances (stand-alone, Always On, FCI), migrating SQL Server databases, and operating SQL Server instances and databases, as well as Azure SQL Services and more. Hocine is a Microsoft Certified Database Administrator Associate, a Certified Administrator for SUSE Linux Enterprise Server 15, and a HashiCorp Certified Terraform Associate. He also holds a Swiss Federal Certificate of Competence as an IT Systems Engineer. Prior to joining dbi services, he worked at T-Systems Switzerland AG as a Database Engineer. His industry experience includes IT services.

12 posts since February 2024

SQL Server Always On Availability Groups and Database Master Keys: A Hidden Failover Pitfall

I recently came across an interesting case involving a client whose application used SQL Server symmetric keys to encrypt sensitive data. The database was hosted in an Always On Availability Group environment for high-availability and disaster-recovery. The interesting and challenging aspect of this setup is ensuring that the encryption and decryption remains intact after a failover. This challenge originates from… 

SQL-Server 2025: Building a RAG Shopping Assistant with T-SQL

In this post, we continue our AI journey with SQL Server 2025 (Preview). In previous articles, I already showed how to call the GPT-4o chat-completion model in Azure directly from SQL Server to generate product descriptions, how to create and store embeddings for semantic search, and how to use the (preview) acceleration features for semantic search workloads. If you want… 

SQL-Server 2025: Vector Indexes & Semantic Search Performance

When performing search operations on large datasets, performance is a key consideration for ensuring that an application remains efficient and user-friendly. This consideration equally applies when working with embedded data. That’s why in this blog post we’ll explore the different possibilities for vector search and show how to leverage the latest features of SQL Server 2025 Preview to accelerate your… 

SQL-Server 2025: Generate Data Embeddings for Semantic Search

In this Blog we will continue with our AI journey in SQL-Server 2025 preview. If you didn’t read the first Blog you’ll find it here: dbi Blog  In this article, we will explore the concept of data embeddings, a key concept for modern AI-driven applications and platforms. We will then examine the latest capabilities introduced in SQL Server 2025 (preview)… 

SQL Server 2025: Where Data Meets Intelligence

The evolution of AI is booming and brings many new possibilities to enhance efficiency and convenience with many different use cases. While AI chatbots have had an almost revolutionary influence in recent years, we are now entering the next phase of this evolution with context-aware AI assistants and autonomous AI agents that will have even more impact. Providers of modern… 

Exploring the Future of Data at SQLBits 2025 in London

I’m looking back on three amazing days of interesting technical insights from the SQLBits event 2025 in London. It’s actually my first time having the pleasure of attending one of Europe’s biggest data platform events and I can sincerely say, that I enjoyed every minute of interesting workshops and sessions all around Data management, Data engineering and analytics with the… 

Set SQL Server Trace Flags Automatically and Smoothly

Managing SQL Server trace flags effectively is a common task for DBAs and system engineers, especially when tuning the SQL Server behavior for specific use cases or performance optimizations. While trace flags can be enabled programmatically using T-SQL commands such as DBCC TRACEON, this approach has an inherent limitation: the flags are session-based or global only until the SQL Server… 

Automate your Deployments in Azure with Terraform!

Terraform is a strong open-source declarative and platform agnostic infrastructure as code (IaC) tool developed by HashiCorp. It facilitates the deployment and whole management of infrastructure. In this hands on blog I will show you how you can use Terraform to automate your cloud deployments in Azure. Initial Setup: For this blog I’m using a ubuntu server as a automation… 

Understanding Head Blockers in SQL-Server

A customer of mine had a recurring issue with one of his business critical applications where everything was frozen and stuck for the users. The issue was caused due to a head blocking transaction which increased blocking in the database exponentially. Depending on your technical background, you may know that locking is a very important mechanism in relational database systems… 

Keep an eye on your SQL Agent jobs using T-SQL!

Introduction: A couple of weeks ago I had a customer who was interested in monitoring the duration of some of his SQL-Agent jobs. The jobs were running in a data warehouse environment and were executing some ETL processes for loading data. The goal was to get informed when one of these specific jobs were running significantly longer than usual. Therefore… 

SQL-Server: What are VLF’s and why should I care about them?

Introduction: What are VLF’s? In SQL-Server, the transaction log is divided into several logical units called virtual log files (VLF). The amount of virtual log files and their size are managed automatically by the database engine. The database engine adds more VLF’s to the transaction log file every time when the transaction log file grows. For this reason, admins can… 

SQL Server: Manage large data ranges using partitioning

Introduction:  When it comes to moving ranges of data with many rows across different tables in SQL-Server, the partitioning functionality of SQL-Server can provide a good solution for manageability and performance optimizing. In this blog we will look at the different advantages and the concept of partitioning in SQL-Server. Concept overview:  In SQL-Server, partitioning can divide the data of an…