SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Gavin Draper's SQL Server Blog

Software Dev/DBA living the dream in sunny Brighton, UK. I've been playing with SQL Server about nearly 20 years now and still feel just as clueless as I did back then. I love writing about things I find as I go along.

Archives: August 2017

Fixing a SQL Server That Wont Start Due To Max Memory Being Set Too Low

I recently came up against a SQL Server instance that wouldnt start, after going through the event log the reason it was having problems was that it had been set to a max memory of 10mb.

At this point I was unable to change the max memory setting because I… Read more

0 comments, 23 reads

Posted in Gavin Draper's SQL Server Blog on 9 August 2017

SQL Server Unique Constraints With Where Conditions

Imagine we have the following table


Field Type
Deleted BIT

Then imagine we want Username to be unique for non deleted users. Normally we would make a field unique by doing something like this…

ALTER TABLE dbo.Users ADD CONSTRAINT uq_username UNIQUE(Username

Read more

0 comments, 22 reads

Posted in Gavin Draper's SQL Server Blog on 2 August 2017