Html, CSS finally come of age?

Attended a really inspirational talk, perhaps HTML/CSS will now be about design rather than weighed down by JavaScript libraries and polyfills?

Jen Simmons CSS Grid


Posted in Uncategorized | Leave a comment

SQL Server with external drives – pending recovery

When you are developing a SQL Server database you might want to use External Storage devices. Beware of a couple of slight gotchas. When you restart your machine SQL Server may start before the drives become available. If this happens SQL Server will mark the database as ‘pending recovery’. To get out of this situation just restart the SQL Server instance and select ‘refresh’ the database node in SQL Management Studio. A second, related problem, is that the drives may not be assigned the same drive letter, this will again result in ‘pending recovery’. If you cannot remember the drive letter you assigned you can run the following against the system database;

select [name], physical_name from sys.master_files

If you now have an incorrectly assigned drive letter, the best solution is to open the disk management tool where you can right-click and assign the original drive letter back.

Posted in SQL Server, Uncategorized | Leave a comment

CTRL ALT DEL in remote desktop


Posted in Uncategorized | Leave a comment

Outlook stuck with ‘Processing’?

Outlook 2016 has an all to frequent problem where it gets stuck on the splash screen saying, ‘processing’. The simplest solution is to stop outlook and Start->Run; Outlook /safe

Then after it starts, close it down and reopen and it should be fine. Seriously…I know.


Posted in Uncategorized | Leave a comment

Quick way to drop all tables and schema from SQL Server

I was about to leap into sp_foreach or even uglier SQL Execute when I discovered that you can right-click on the database->generate scripts. Then in the advanced options you can select DROP only. Easy.


Posted in Uncategorized | Leave a comment

Waiting for async delegate

Sometimes you want to create a task that you want to start as async but you want to track its status at a later date. The problem is that a task created this way will appear to have completed, and you’ll never know if it faulted or not. One solution is use a Func and  Unwrap the resulting task.

t = Task.Factory.StartNew(new Func<Task>(async () =>


while (true)


await Task.Delay(1000);

throw new ArgumentNullException();


value = 1;


Posted in Uncategorized | Leave a comment

The fastest way to get a table row count in SQL Server

While variations on select (xyz) from table all work, they all suffer from searching/scanning data and the overheads that incurs. The best mechanism I have found is;

EXEC sp_spaceused N'<schema>.<table name>’;


Posted in Uncategorized | Leave a comment