SQL Server
Update SQL Server Management Studio (SSMS) automatically
The fire-and-forget method to update SQL Server Management Studio (SSMS) automatically by uninstalling any installed version and downloading & installing the newest available version from Microsoft.
Get SQL database backup details with PowerShell
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...
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.
Monitor SQL Server and databases in depth using Zabbix
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).
Convert SqlCe database to SQL Server
How can I convert an SqlCe database to Microsoft SQL Server?
Install SQL Server cumulative updates silently
Learn how to install SQL Server cumulative updates (CU) silently using PowerShell opposed to the cumbersome task of running the GUI installer.
Block brute force attacks on SQL Server, block IP addresses in Windows Firewall using PowerShell
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.
Manually failover all databases in an SQL Server Database Mirroring configuration
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 will show you how to manual failover mirrored SQL Server databases using Transact-SQL (T-SQL) in SQL Server 2017 and up.
How to determine if a SQL Server backup is compressed?
Compressed SQL Server backups can be verified in PowerShell using a handy PowerShell function. This comes in handy when you need to verify if existing SQL Server backups are compressed.
How to install Microsoft’s SQL Server Driver for PHP
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.
Configure SQLServer sessionState for Umbraco
Configure Umbraco for SQLServer sessionState storage and prepare Umbraco for high performance web garden or web farm, and load balancing environments. This post explains it all.
Connect to MS SQL Server with PHP 5.3+
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.