Microsoft SQL Server logo

Get SQL database backup details with PowerShell

2023-08-21

Whenever I need to restore an SQL Server .bak backup file, I want to know some properties of the backup file to make sure I'm working with the correct file(s). Luckily, the .bak file and PowerShell provide all the information I need, so I don't have to start a Restore procedure in SQL Server Management Studio (SSMS) just to view the header information. As you know, SSMS is slow...

Microsoft SQL Server logo

Create an additional SQL Server Login

2022-12-27

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.

Microsoft SQL Server logo

Monitor SQL Server and databases in depth using Zabbix

2022-12-20

Monitor Microsoft SQL Server, databases and performance with Zabbix, PowerShell, Performance Counters and WMI. Keep SQL Server and databases in top shape and performance up! In this post I show you how you can use Zabbix to monitor those important aspects for database administrators (DBA).

PHP logo by Colin Viebrock

Connect to MS SQL Server with PHP 5.3+

2013-03-22

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. Learn how to connect to a Microsoft SQL Server database using PHP 5.3+ and SQLSRV.