Infrastructure at your Service

All Posts By

Steven Naudet

Steven Naudet

SQL Server TCP: Having both Dynamic Ports and Static Port configured

By | SQL Server | No Comments

Introduction Have you ever seen an SQL Server instance configured to listen on both “TCP Dynamic Ports” and “TCP (static) Port”? This kind of configuration can be caused by the following scenario: A named instance is installed. By default, it is configured to use dynamic ports. Someone wants to configure the instance to listen to a fixed port and set the “TCP Port” value The “TCP Dynamic Ports” is set to value “0” thinking this…

Read More
Steven Naudet

Validate your SQL Server infrastructure with dbachecks

By | Database Administration & Monitoring, SQL Server | 3 Comments

Introduction In this blog post, I’ll do an introduction to the PowerShell module dbachecks. dbachecks uses Pester and dbatools to validate your SQL Server infrastructure. With very minimal configuration you can check that your infrastructure is configured following standard best practices or your own policy. We will see the following topics – Prerequisites for dbachecks Installation – Introduction to Pester – Perform a Check – Manage the Configuration items – Import & Export – Output…

Read More
Steven Naudet

An Introduction to Pester – Unit Testing and Infrastructure checks in PowerShell

By | Database Administration & Monitoring | No Comments

Introduction If you never heard of it, Pester is a PowerShell module, written in PowerShell. It’s a framework for writing and running unit tests, integration tests, and also infrastructure checks as we will see in a moment. Pester is used for example to test PowerShell Core and Pester itself. In this blog post, I’ll do a short introduction to Pester with Installation and basic checks examples. Installation Pester is shipped by default with Windows 10…

Read More
Steven Naudet

Getting started with SQL Server on Linux containers with Docker Desktop and WSL2

By | Database Administration & Monitoring, Docker, SQL Server | One Comment

In this blog post, I will show you the steps I went through to run SQL Server inside a Linux Docker container on my Windows 10 laptop. The aim here is to deploy quickly and easily SQL Server instances in my lab environment. Introduction Since May 2020 Windows ships with WSL 2. Windows System for Linux is a feature that creates a lightweight environment that allows you to run Linux distributions (Debian, Ubuntu, etc.) without…

Read More
Steven Naudet

SQL Server: Generating SQL script using PowerShell and Template file

By | Database Administration & Monitoring, Database management, SQL Server | No Comments

In this blog post, I will share with you a small PowerShell script I did recently. I have noticed that my customer performs a very repetitive and time-consuming task almost every day. New columns are added to tables on their business-critical database and they need to maintain SQL scripts file with all the ALTER TABLE statements for each new column. For every new column, my customer copy-pastes the following SQL Script and then change parts…

Read More
Steven Naudet

SQL Server AlwaysOn node “Add all eligible storage to the cluster”

By | Database Administration & Monitoring, SQL Server | No Comments

I made a mistake recently when adding a new node to an existing Windows Failover Cluster supporting AlwaysOn SQL Server instances. When adding a new node using the GUI there’s this option checked by default named “Add all eligible storage to the cluster”.   Before performing the operation the disks on the 2 nodes of my cluster were used by the SQL Server instances. Because I’m using the AlwaysOn features the disks are local on…

Read More
Steven Naudet

SQL Server: High SQLCONNECTIONPOOL Memory Clerk consumption

By | Database Administration & Monitoring, SQL Server | No Comments

In this blog post, I will show you what I did to troubleshoot an interesting problem with Memory on SQL Server. It all started with a job performing DBCC CHECKDB on all databases taking hours to complete instead of 10 minutes. So the Job ran outside of its maintenance window, still running in the morning when users come back to the office. They immediately complained about poor application performance. While running the CHECKDB we could…

Read More
Steven Naudet

SQL Server Installation Wizard error : Failed to retrieve data for this request

By | Database Administration & Monitoring, SQL Server | No Comments

Today I faced a strange issue when I tried to install a new SQL Server instance : Failed to retrieve data for this request This error occurred just after clicking on “New SQL Server stand-alone installation…” The error message is not helpful at all. So, the first step to troubleshoot an issue is to look at the error logs. The location by default is : C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log There is a summary.txt file…

Read More
Steven Naudet

SQL Server: Change Availability Group Endpoint Ownership

By | Database Administration & Monitoring | No Comments

I’m doing some cleaning on my customer’s instances. I want to delete the login of a previous DBA for 2 reasons; this person does not work anymore in my customer’s company and all DBA are members of a group that is given permission on the instances. I don’t want to see any DBA’s personal login on SQL Server instances. When I try to delete the login I receive the following error; Msg 15173, Level 16,…

Read More
Steven Naudet

Introduction to Azure SQL Database Auto-failover groups

By | Cloud, Database Administration & Monitoring, SQL Server | No Comments

SQL Azure Database by default offers a 99.99% availability SLA across all its service tiers. This means that for any database, the downtime should not exceed 52 minutes per year. Using Zone redundancy increases availability to 99.995% which is about 26 minutes per year. These impressive numbers can be achieved through in-region redundancy of the compute and storage resources and automatic failover within the region. Some disruptive events may impact the region’s availability like Datacenter…

Read More