Category: SQL Server

  • SQL Server Policy-Based Management the hidden configuration baseline.

    Policy-Based Management Policy-Based Management is a policy based system for managing one or more instances of SQL Server. This has been around in SQL Server since 2008 but is often overlooked for both its primary function in administration as well as its ability to store baselines. If you open up SQL Server Management Studio (SSMS)…

  • Regain access to SQL Server via inject service

    One way to regain access to SQL Server is to use a simple inject technique which overrides the current Image Path for the SQL Writer service.   PsExec can alternatively be used to access SQL Server as shown in the post below. This relies on the NT AUTHORITY\SYSTEM account having been granted system administrator on…

  • Microsoft SQL Server 2016 build

    Here is a quick post for the recommended patches to deploy for Microsoft SQL Server 2016. After deploying Microsoft® SQL Server 2016 I would recommend immediately patching to 13.00.1708 by applying the MSVCRT patch. (Unless planning to apply a later CU or SP) Critical update for SQL Server 2016 MSVCRT prerequisites https://support.microsoft.com/en-us/kb/3164398 This ODBC patch…

  • Backup History

    If you want to see more than just when the last backup occurred. Here is a script for backup history with two bonus features. Backup compression ratio – CompressionRatio Backup speed – Backup_MiB_S

  • SQL Server and PowerShell (SQLPS) Starter

    The following two snippets of code are two ways to achieve the same outcome, which is the $Server object containing the default instance. Or when opening a SQL PS (Powershell) prompt at the default location. e.g. PS SQLSERVER:\SQL\SB01\DEFAULT> I mention this because I was asked what the simplist entry point to PowerShell for SQL person…

  • SQLBits XV – 4 – 7 May 2016

    Very exciting SQLBits is nearly here again. Still time to register if you have not already done so 🙂 Exhibition Centre Liverpool Kings Dock Waterfront Liverpool Merseyside L3 4FP United Kingdom https://sqlbits.com/

  • Using the default system_health Extended Event

    The default extended event system_health appeared in SQL 2008 and provides several key monitors, which can prove useful when investigating issues. In the past I have mentioned this in the capturing deadlocks post as it is one of the monitors automatically in place and it is an easy way to grab the deadlock xml. However…

  • Creating a Deadlock

    Previously we have looked at how to capture a deadlock, but how do we go about creating a deadlock? I think the following is the simplest method: 1. Create two tables with a single row in each and update a row in the first table (note transaction is started with BEGIN TRAN, but not committed.)…

  • SQLRelay Bristol (13th Oct 2015)

    Just checked and this is down to the last 60 tickets, so I would register quick if you are able to come to the south west for this one. This event will be held on 13th October 2015 at Future Inns, Bond Street, Bristol, BS1 3EN #SQLRelay Bristol (Oct 13) http://www.sqlrelay.co.uk/bristol 

  • Most Recent SQL Query

    Here is another query that is useful to have when you need to find out what everyone is up to. Or in some cases when we need to recover what was on someones ssms before they accidentally closed without saving work. 🙂