After listening to an interview of Sean McCown (twitter) and some lively discussion on xp_cmdshell, I decided it would be a worthy enough discussion to create a blog post. At a minimum it might stir up some opinions. There are many varying opinions out there, including some really good opinions that applied to SQL Server 2000, but don’t really apply …

Is enabling xp_cmdshell a security risk? Read more »

The alternate solution to the Database Corruption Challenge this week was created by Patrick Flynn. This solution is the only solution to successfully recover all the data without using any of the backups. If the challenge had been structured differently and all you had was just the database files and no backups, this solution would work just fine. As you …

Database Corruption Challenge Week 7 – Alternate Solution Read more »

Here is a short video tutorial that shows how to use the COALESCE function in T-SQL on SQL Server. This was originally part of my free SQL query training for the 70-461 certification exam. Here is the first sample code from the video: And then the code that shows the performance differences: More Info: Additional Training on my YouTube Channel …

Using the TSQL COALESCE Function Read more »

In this presentation we will be training on TSQL Functions, there will be three sections. —Date and Time Functions —Logical Functions —User Defined Functions Here is the link to the Google On Air Broadcast where you can watch live (or recorded later) for free. https://plus.google.com/events/cb0pj9ghp5elt6i241kstphcvr0 Here are the slides. And here is the broadcast at YouTube: This session will be …

SQL Training – Functions (70-461) Read more »

First lets take a look at two queries using CURSORS, the first one will use the FORWARD_ONLY type cursor, and the second will use the FAST_FORWARD type cursor. These two types sound very similar, but perform quite differently. Now for the FAST_FORWARD CURSOR example. Notice only one line has changed, that’s the line that says “SET @PeoplePhoneCursor = CURSOR FAST_FORWARD …

Simple Cursor Example : FORWARD_ONLY vs FAST FORWARD Read more »