Month: December 2015

pgSQL vs T-SQL – Enforce uniqueness on a column but allow multiple nulls

A Unique constraint is used to enforce unique values across one or many columns, often applied against Alternate keys of a table. Sometimes you want uniqueness enforced only where data for a column is present, and not where values are Null, for example, when storing optional Person attributes such as National Insurance numbers or Driving Licence numbers. Section 5.3.3. Unique…

SQL Server – Casting Integers to Asterisk

An odd ‘feature’ of T-SQL that once sent me on a wild goose chase. If you try to cast an integer to a smaller length char/varchar data type, the database engine silently casts the value to an asterisk ‘*’. This is also true for when you rely on an implicit cast such as during an Insert.  

   …

SQLIO

You’ve spent thousands on a shiny new server. Before you go ahead and configure your database environment, now is a good time to tune the software side of your storage subsystem for optimal performance. SQLIO is a Command Line IO benchmarking utility for Windows which can help you do just that. For Linux, consider utilities such as fio or bonnie++.…

X2Go Connection Failure – Failure negotiating the session in stage ‘7’

X2Go is my favourite remote desktop solution for Linux, mainly because its so responsive. Hopefully I’ll write up a quick How To on getting it setup soon, but for now, here’s an issue I’ve just overcome after a couple of days of stress!   Issue SSH connection to my home server was working fine but X2go had stopped working. This…