Rob Janssen

All | English | Nederlands

Storing IP's and networks in SQL Server efficiently

When you Google on how to store IP addresses efficiently in SQL server few approaches keep coming up. Most of these approaches most notably tend to 'forget' about IPv6 and work exclusively for IPv4 IP addresses. Other approaches use a (var)char to store IP addresses and this works fine, as long as your (var)char allows up to 39 characters if you want to be able to handle IPv6 IP addresses. It'll also work fine whenever all you need to do is store an IP address or maybe even search for a specific IP address, such as in logging scenarios, where you can write SELECT * FROM MYTABLE WHERE [ip] = '192.168.0.1' . However, when storing networks (such as 192.168.0.0/24 in CIDR notation) things get a bit harder. If you want to find all networks that 'contain' a given network you're in for some trouble. Another solution is to store IP's as (var)binary. Again, most solutions I found only worked with IPv4 but it's perfectly possible to store both IPv4 and IPv6 IP's in a single (var)binary field. Read more »

Udemy family sharing

Udemy is having one of their sales and a lot of the courses seemed interesting for my kids, my wife or myself. We always use our separate accounts and keep them to ourselves. For everything. However, since I couldn't find any information on family-sharing (as you can with, say, Steam for example) I purchased some courses on my account and decided to share my account with my family (thanks LastPass for making that easy!). Read more »

Loud Mean Well LRS-350-24 fan

Recently I bought a Mean Well LRS-350-24 AC/DC power supply to drive a decent length of LED strips. It turns out the fan in this power supply is kind of loud - it has only kicked in twice but both occasions I was astonished about the loudness of the fan. A quick Google showed that I'm not alone in this. Read more »

How to erase your SSD / HDD using hdparm

I recently had to ship some (used) drives back to the manufacturer. And even though I'm pretty sure the drives will be erased first thing and even though the drives were used in a RAID (actually SHR2 ) set with an encrypted volume and it would be hard, if not impossible, to recover anything from them without my help I'm still never too keen to keep my bits and bytes on drives that are out of my hands. Selling my laptop? Erase drive. Recycling an old workstation? Erase drive. Then use a hammer to whack a screwdriver through the drive or "drop" (rather: throw) the drive on the ground a few times. You never know where a drive ends up and in who's hands. Read more »

WD Red NAS drives use SMR and I'm not happy about it - understatement of the year

If you're into NAS drives then you may have heard that recently word got around that Western Digital's NAS drives, the WD Reds specifically, apparently use SMR - Shingled Magnetic Recording . There's been a lot of fuss about it and I'm not about to repeat it all so that's why I'll provide some links to other sources I came across myself. What this blogpost is about, though, is me documenting what happened after I contacted WD from a customer perspective. Your experience may vary, but what you're about to read is mine . Read more »