May 21, 2018
Logging sp_whoisactive to a table

This is a follow-on post of sp_who, sp_who2 & sp_whoisactive and is a run-through of logging SQL activity to a table. Even if you are equipped with a SQL Server monitoring tool, you still may be having trouble finding that slow/blocking query that runs during the night. Running sp_whoisactive periodically (e.g. every 30/60 seconds) and […]

May 21, 2018
sp_who, sp_who2 & sp_whoisactive

Sp_whatnow? sp_who, sp_who2 and sp_whoisactive are stored procedures that allow you to view current users, sessions, and processes within a SQL Server instance. You'd want to see this for identifying things like blocking or checking general activity. sp_whoisactive is definitely one of my favourite stored procedures. Created by Adam Machanic, this tool gives you an […]

Study Blog
May 19, 2018
Geographical Spatial Environmental Mental

The title is just words thrown together. I'm glad you noticed. This post is the start of a "Study Blog" category, which is more or less a scribble pad for when I'm watching a video or reading stuff. My thoughts recently have been with the 70-461 Querying Microsoft SQL Server 2012/2014 exam. I was converted […]

SQL Server Go To Line
May 16, 2018
Show Line Numbers in SQL Server Management Studio

This is a tip on how to show line numbers in your SQL Server Management Studio (SSMS) query window. This can be useful for when you receive an error with reference to a line in your code, although it’s not a necessity having it enabled as you’ll see below. I’ve created a simple script to […]

fe_sendauth: no password supplied
May 15, 2018
Reset postgres user password

If you forget what you entered as the postgres user password during the install, then this is a guide for you! It's exactly what I did which is the reason for a post. The shameful thing for me is that only a hour had passed since installing PostgreSQL, I was left searching the web to […]

PostgreSQL
May 14, 2018
Installing PostgreSQL 10 (Inc. Stack Builder) on Windows

A very simple wizard run-through of a PostgreSQL and Stack Builder installations. Installing PostgreSQL PostgreSQL official downloads can be found here. Also see this link (chapter 16) for installing this on a Linux system. 1. Run set-up exe file. 2. Specify installation directory. 3. Select features. 4. Specify data directory. 5. Enter the superuser (postgres) password. […]

SQL Script Case When
May 13, 2018
Get Disk Space of a SQL Server

You can quickly check disk space info on a SQL Server host by running the query below. I sometimes find this the quickest way to check available space rather than using PowerShell or the Windows GUI. This SQL Script only work on SQL Server 2008 R2 and above. [crayon-5c913ad60e736810250117/] The query result will be returned […]