Latest Blog Posts
You know you want to go on the SQL Cruise. You can. You just have to convince the boss that it’s worth doing. It is. I’ve said it before and I’ll repeat it as necessary, SQL Cruise changes peoples lives. I’ve watched people go on the cruise with a… Read more
Something that i keep seeing in documentation, in forum code and in real systems is transactions that have names
BEGIN TRANSACTION VeryImportantProcess <do stuff> COMMIT VeryImportantProcess
Now the question came up on the forums a while back as to what the point of this is. Why would you name a… Read more
I love working with indexes, and I need to know what’s using them to work on them intelligently. Most of that information is already there waiting for you to query it. Luckily, Jonathan Kehayias (b|t) did the hard work for us in his post Finding what… Read more
Today I had a need to manually trigger and sustain a Blue Screen of Death (BSOD) inside a Windows Server VM. The goal was to be able to trigger a BSOD so that I could work on the detection of powered on but failed VMs inside a server environment. All… Read more
You have an on call, you have a business continuity plan, you have a disaster recovery plan but what happens when your developer, DBA or whoever is hit by a bus?
User: Oh noes! The web sites down!
One quick call later
Developer: Hmm, it looks… Read more
My previous post was focused on controlling read operations. With the latest enhancements to the row-level security, it is now possible to restrict write operations as well. This feature is
currently available as a preview now generally available in Azure SQL Database V12. Let’s see how that works.
There was a time I worked in a company any we lived in the command line. This was in the early 90s, prior to Windows v3.1 being released and we primarily used DOS on a Novell network.
We also had paper phone books on every desk for the 1,000+ people… Read more
Duplicate indexes, one of the most pointless things you can do to a table that just adds pure overhead. No one likes them so SQL Developers do your DBA's a favour and stop them from ever being deployed :)
This new tool for the SSDT Dev Pack adds a menu…
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DataStoreNative.UpdateMetadata(IntPtr handle, Object rowset, String dbstamp, UInt32& changes)
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.Datastore.UpdateMetadata(Object rowset, String dbstamp)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.EndBackendCall(BackendCallData data)
I think there were are few sighs of relief around the country yesterday after the chancellor finished giving his autumn financial statement to parliament. For the past few weeks there has been plenty of reports of doom and gloom from the various media channels suggesting that the end was nigh… Read more
Microsoft continues to improve indexes and options for additional performance enhancements. One I see frequently is the need for a covering index. Before we look at those options, let’s talk about the need for a covering index.
The term covering index was created probably a decade ago. The idea is… Read more
Intoduction to Stored Procedures in SQL Server
SQL Server uses Different types of stored procedures. They are the quickest method of accessing and manipulating database on the server. SPs are codes and scripts that are predefined for repetitive tasks to be performed on the server involving a database/its table/pages,… Read more
The ACID acronym standing for Atomicity, Consistency, Isolation and Durability is the foundation of SQL transactions. Transactions are used when the database has to be modified by using one or more SQL statements and to make sure the security of the database as well. However, at times, this normal… Read more
In-line TVF's are awesome, they are a great way to reuse T-SQL code without the performance penalties of multi line TVF's or horror of horrors Scalar Functions. Taking select statements and turning them into in-line TVF's is actually really really simple using the TSql ScriptDom so here is another tool…
New ScriptDom visualizer now also shows the tokens that are found in a sql script. It also highlights the part of the query that is covered by the token so it is really easy to see where you are in the script.
Honestly if you are doing anything with the…