SQL Server

Create an additional SQL Server Login

Sometimes you need to create an additional SQL Server Login (user) for your database (databases). Here is a small T-SQL snippet that creates such a login for contained databases in SQL Server and adds memberships.

Read More

Monitor SQL Server and databases in depth using Zabbix

Keeping your SQL Server and databases in top shape is key for a good performing SQL Server database server and its databases. A good performing server makes happy customers, and that’s what puts bread on the plank, right? In this post I’ll show you how you can use Windows Performance counters, PowerShell and Zabbix for in depth monitoring of your SQL Server server and SQL databases.

Read More

Convert SqlCe database to SQL Server

How can I convert an SqlCe database to Microsoft SQL Server? Now the SQL Server Compact (SQL CE) database type is unsupported, it’s recommended by Microsoft to upgrade to SQL Server. But how do you convert your SqlCe database? I’ll explain in this article, read on.

Read More

Install SQL Server cumulative updates silently

Install SQL Server update silent: installing SQL Server cumulative updates is always a cumbersome, and quite daunting task. Unpacking and running the CU installer is a slow process, you have to click through a lot of screens, and it’s hard to get it to install silently. But here is how!

Read More

Block brute force attacks on SQL Server, block IP addresses in Windows Firewall using PowerShell

This PowerShell solution blocks IP addresses that are trying to brute force your SQL Server logins, by blocking IP addresses in Windows Defender Firewall with Advanced Security. For the time being, some manual labor is involved, but it is still manageable. You can use this to create your own solution to block offending IP addresses in SQL Server’s firewall.

Read More

Manually failover all databases in an SQL Server Database Mirroring configuration

How to manually failover an SQL Server database mirroring session? A manual SQL Server failover can only be initiated from the principal server, and the mirrored database must be synchronized (that is, when the database is in the SYNCHRONIZED state). In this article I’ll show you how to manual failover mirrored SQL Server databases using Transact-SQL (T-SQL) in SQL Server 2017+.

Read More

How to install Microsoft’s SQL Server Driver for PHP

In this article I’ll show you how to install the Microsoft SQL Server Driver for PHP 7+. This makes the use of an SQL Server database back-end for your PHP website easy. If you want to communicatie with SQL Server using PHP you need to rely on some additional software and PHP extensions. This post walks you through the steps necessary to install the SQL Server driver and SQLSRV extension for PHP 7+, on Windows Server IIS of course.

Read More

SQL Server versions list

How to Identify Your SQL Server version and edition.


An unofficial build chart lists all of the known SQL Server Service Packs (SP), Cumulative Updates (CU), patches, hotfixes and other builds, including builds of MS SQL Server 2019, 2017, 2016, 2014, 2012, 2008 R2, 2008, 2005, 2000, 7.0, 6.5 and 6.0 that have been released.

Read More

Configure SQLServer sessionState for Umbraco

Configure Umbraco for SQLServer sessionState storage, for your sessions. This post explains how to prepare your Umbraco website for a high performance web garden or web farm, and load balancing environments: Store your ASP.NET / Umbraco sessions out-of-process (OutProc). As opposed to the default in-process (inProc) sessions, where sessions are saved in the worker process.

Read More

Connect to SqlCe (SQL Server Compact) database from ASP

Connect to SQL Server Compacy (SqlCe) database with ASP. Here is how to install the Microsoft.SQLSERVER.CE.OLEDB.4.0 Provider and use classic ASP to connect to an SqlCe (SQL Server Compact) database sdf file, as a Microsoft Access database replacement. For Windows Server IIS. SQL Server Compact (SqlCe), the embedded database engine, is the default database for Visual Studio 2010 SP1 and WebMatrix 3. This means, it’s recommended to use SqlCe over Access nowadays.

Read More

Connect to MS SQL Server with PHP 5.3+

Connect to a Microsoft SQL Server database with PHP 5.3+ using the SQLSRV API and sqlsrv_connect. As of PHP 5.3.2 you have to use the SQLSRV API functions to connect to an Microsoft SQL Server database from PHP. For example, use sqlsrv_connect() to create a connection resource and open a connection. The main difference with the older mssql functions of PHP is that SQLSRV requires an Array() with connection information, instead of strings.

Read More