Infrastructure at your Service

Category

SQL Server

Nathan Courtine

Automate CNOs and VCOs for SQL Server AAG

By | SQL Server | 2 Comments

During the installation of a new SQL Server environment in a Project, we wanted to automate the whole process deployment and configuration when installing a new SQL Server Always On Availability Group (AAG). This installation requires to prestage cluster computer objects in Active Directory Domain Services, called Cluster Name Objects (CNOs) and Virutal Computer Objects (VCOs). For more information on the prestage process, please read this Microsoft article. In this blog, we will see how…

Read More
Steven Naudet

SQL Server: Control the size of your Transaction Log file with Resumable Index Rebuild

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

Introduction In this blog post, I will demonstrate how the Resumable capability of Online index rebuild operation can help you to keep the transaction log file size under control. An index rebuild operation is done in a single transaction that can require a significant log space. When doing a Rebuild on a large index the transaction log file can grow until your run out of disk space. On failure, the transaction needs to rollback. You…

Read More
Stéphane Haby

First steps on Kusto Query Language (KQL)

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

Do you know this query language?  No, it’s time to explain you and see what it is.   “A Kusto query is a read-only request to process data and return results.” dixit Microsoft Documentation here The KQL is very simple to understand and use. I can do it then you can also do it! 😛 The first thing to know is how to call the information on a table. In this case you  need to…

Read More
Stéphane Haby

SQL Server tips: How to migrate database-users in another domain without touching permissions

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

By a customer, I must migrate a database from a domain to another. The goal is to keep the database-user permissions, take the new SID from the windows login of the new domain and change the database-user name. In my blog, I will do it with two dbi’s domains: – dbiservicech: The old domain – dbiservicecorp: The new domain I have two Windows groups dbiservicech\dbi-owner and dbiservicech\dbi-reader in my database test-dbi. I create two new…

Read More
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

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
Franck Pachot

Data virtualization on SQL Server with Redgate SQL Clone

By | Cloud, DevOps, SQL Server | No Comments

By Franck Pachot . In the previous blog post I’ve installed SQL Server on the Oracle Cloud. My goal was actually to have a look at Redgate SQL Clone, a product that automates thin cloning. The SQL Server from the Oracle marketplace is ok for SQL Clone prerequisites. There’s a little difference in .NET Framework version (I have 4.6 where 4.7.2 or later is required but that’s fine – if it was not an update…

Read More