Some Random Tips for a Guy at Work.

____________________________________________________________

Table of Contents

  1. Details
  2. Indexes Present
    1. Dbo.Harvest Primary Key
    2. All Indexes in DB
  3. How to Trace It

____________________________________________________________

0__Details

Just Confirming I was in the Right Place,

Was Looking @

  • DB
    • Dbo.Harvest
    • Dbo.Setting
    • Dbo.SettingSnapshot

Files: Anything I link or show below can be found here

 xx.0 – GMDB Database Locks in Settings Table

____________________________________________________________

1_Indexes Present

  • Indexes = Dbo.Harvest
    • ‘cnstHarvest’
      • This is one due to the Primary Key on the table, and is a non-locking index and *should* not be causing the issue
      • Removing this index will remove the ability to ensure the Primary Key is Unique
      • Confirmed via a re-creation:  Index Creation _ Harvest _ Private Key.sql
        • Suggestion: we leave it there, the ‘risk vs reward’ gut check isn’t in our favour.
  • Indexes = Entire Database
    • I have extracted all of the potential locking indexes via the below script, results attached:
      • Script:  Grab All Indexes _ Non Key.sql
      • Results:  All Indexes in DB_MG.xlsx
  • Did a second pass, to ensure there wasn’t anything hiding:
    • Script:  Return Index Info for Table.sql
  • To be honest, I found little of interest in the above w/ our current issues

____________________________________________________________

2_Trace It Manually

See below to set the mood.

  • Best way to handle this is to run a SQL Activity trace, but it needs both of us online and with time to kill.
    • I can also lend Shah to the process if I am not around.
      • Some of the below is for his benefit, just in case.
  • I have installed a couple toys to help,
    • Sp_BlitzLock
      • Handy proc for diagnosing active locks, is now in Master of SQL1 (and SQL0)
      • Simple as
        • Execute sp_BlitzLock on DB;
        • If there was anything to show:
  • SQL Activity Monitor & SSIS Automation Suggestions
    • Helpful in the moment, but useless after its already happened.
      • Using ‘Recent Expensive Queries’ records, you should be able to ID any queries clashing and generating locks and ‘lock_wait’ or ‘deadlock’ status flags.
      • By right clicking on expensive queries that affect those locks, you can select “Show Execution Plan”
        • This delivers the below screenshot, where it shows you where the wait and lag are of the execution,
        • I regularly use this to ID a Stat or Index that is making the process slow and removing / updating it.
          See below, it is showing the table scan is taking 45% of the effort (by design with an index, no fix needed)
  • SQL Profiler
    • Full Admin Access Req
    • Will Run a Profiler against active connections as they run,
      • Will Slow the DB and Server, down while the trace is running, so we cant leave it running for ages.
        • Example of what I would usually focus on
  • What the Output looks like:

Docker on Ubuntu

Is what it is, just a page so I don’t have to remember all this again.
Do: Use this if you cant remember the commands
Don’t: Use this if you’ve never done this before, it’s not written for you.


Deploy Ubuntu to a vm, 24.x worked fine, I’m sure current is fine.

sudo apt update && sudo apt upgrade -y

## you might want nano? 
## depends if you used minimal. 
## #ViSux
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

## Get current gpg from website if later than say, 2026?
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

## Don't Skip it, even though you know you want to. 
sudo apt update

sudo apt install -y docker-ce docker-ce-cli containerd.io

## Test Install
docker --version 

## Init.d
sudo systemctl enable docker

And we’re done

Don’t go looking for where to put the composer file, can go anywhere, you decide. Home is fine too, but, you know…

To be lazy and edit configs in containers, pull the file to local cd via;
docker cp <dockerid>:/path/to/the/file .

To jump into bash
(This is basically useless without the common toolset btw).
docker <dockerid> -exec /bin/bash

Cathedral Post #768

My dudes, this…. this is the project that will never end.

I’ve been around, I know the score.
And I know all about projects that never (and desperately need to) die.

That said, the winds of gorram change are blowing, and we are nearing *an* ending on that wind finally.*

Structure – done
Roof – done (sexy, too)
Windows – done
That godawful white floor – done. never doing that again. ever 😐
The Yard? – done.
Furniture – printed.
Front Gate – 20 mins out + 2 days of drying
LEDS – decided to wait on furnishings.

I’d say about… 2-4 hours away from a good final varnish?
I have also said that before.

All that aside, just look at this thing. It’s a shitty quality print (cheap filament from AliEx).
Yet, once painted and flocked, it’s absolutely mint.
Once it’s properly decked out inside, going to look great.

I reckon I’ll I just sell it so I never have to look at it again.
I think I could have built a house by hand in the woods with the time sunk into it.
Still not finished, either, mind you.
That’s the pesky wind, again. Always blowing.

Anyway, see below, my (current) masterpiece.

Maybe put this on first,
gotta set that mood after all. ¯\_(ツ)_/¯


Long Days, Pleasant Nights.

Footnote
*Been really reminiscing about Wheel of Time after that third season. What an odd series and general 90s-esque taking-itself-way-too-seriously fantasy vibe to have, ain’t much else like it due to its age. Maybe Brooks and Shannara but that has a bit of a ‘kiddy’ feel to (despite the gratuitous violence, death, depression and PTSD from the get go).
Odd memories, of a time well before… god anything that really frames who I am as a person today; tech, marriage, interests, favourites, experiences.
Crazy how time flies.