To NOLOCK Or Not?

I was having a discussion with another DBA the other day about a particular stored procedure. It was a paging stored procedure with a number of other tasks to do. He was adamant about me including the NOLOCK hint for the SELECT statements. He ranted a bit about how it was "best practice" to...

Continue reading To NOLOCK Or Not?

Rate Mix Math Problem - An SQL Solution

Periodically people send me emails or some other form of a message asking me for help with problems that are facing. Since I have some proficiencies in mathematics, in some cases the problems tend to be very related to mathematics. One such problem came to me from someone I have never met, but know on...

Continue reading Rate Mix Math Problem - An SQL Solution

SQL Profiler Command Line Options

I find it very helpful that when I am developing applications that use a database to see what is being sent to the database. Now, let’s be clear – I think anyone that does any development against a SQL Server database should be aware of SQL Profiler and can use its basic functionality. So, to help speed...

Continue reading SQL Profiler Command Line Options

Introduction to SQL Profiler

Many times I see web developers using many tools to help them with their day to day duties. WebDevs use VS.Net, stripped down text editors, CSS tools, JavaScript tools, browser plug-ins…the list is never-ending. Not to mention the languages (ASP.NET, PHP, Ruby, etc.) One thing typically in common...

Continue reading Introduction to SQL Profiler

SSMS Custom Keyboard Shortcuts

There has been some discussion about shortcuts to SQL Server metadata on some of the mailing lists I am on. I thought I'd share the shortcuts I use on a daily basis with people. Now for my listing. I'll include the defaults from SQL Server already. To get to the shortcut menu, click on Tools...Options...

Continue reading SSMS Custom Keyboard Shortcuts

Trim custom characters in a SQL string

Someone on one of the SQL Server lists I subscribe to proposed a question earlier today - How do you trim leading and trailing characters? In this case, the desired string was a numerical string, and the character to trim was a period. There were several responses to that question. I felt compelled to...

Continue reading Trim custom characters in a SQL string