SQL Server with Mr. Denny:

T/SQL


March 12, 2014  5:00 PM

Learn Before You Plan



Posted by: Denny Cherry
Data Normalization, Database Administration, Database Design, Query tuning, SQL, SQL Server, SQL Server stored procedures, T/SQL, Tables

Walking into a new shop every couple of weeks has its challenges. What sort of problems are they going to throw at me. Recently I had the...

January 15, 2014  2:00 PM

Fixing TempDB database problems when starting SQL using a minimum config



Posted by: Denny Cherry
Data Loss, Database, Database Administration, SQL, SQL Server, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, T/SQL, TempDB

So the other day I typo'ed something. Usually this isn't that big a deal, but in this case when fixing tempdb for a customer I told SQL to put two logical files into the same physical file. I was able to get it to let me do this because I first added the files, then realized that I had put them...


December 26, 2013  4:00 PM

Indexes on forign keys can make a big difference



Posted by: Denny Cherry
CREATE INDEX, Database Administration, Indexing, Nonclustered Index, SQL, SQL Server, Tables

It's amazing just how much difference having a non-clustered index on the child table of a foreign key can matter when the foreign keys have cascading...


May 22, 2013  2:00 PM

The Optimizer Isn’t As Smart As You Might Want It To Be



Posted by: Denny Cherry
Database, Database Design, Index Performance, Performance, Performance Problems, Problems, SELECT statement, SQL Server, SQL Server 2008 R2, Stored Procedures, T/SQL, Tables

A little while back I got one of those phone calls.  You know the one, the lovely 6am phone call about random performance problems.  There were two...


May 3, 2013  10:25 AM

Atlanta SQL Saturday PreCon



Posted by: Denny Cherry
In Person Events, SQL, SQL PASS, SQL Server, T/SQL

At the upcoming SQL Saturday in Atlanta, GA I have the honor of delivering a precon on database security which has several seats still available. This precon is a full day session where we will be talking about all the security best practices. Signing up for the precon is pretty simple, just...


January 23, 2013  9:00 AM

NOLOCK is not a turbo button



Posted by: Denny Cherry
CREATE INDEX, Database, Execution Plans, Indexing, SELECT statement, SQL Server, T/SQL, Tables

All to often when talking to developers they put the WITH (NOLOCK) table hint in place to speed up queries without understanding what the table hint does.  I've...


November 21, 2012  9:00 AM

Fixing a table that has overflowed its primary key



Posted by: Denny Cherry
Clustered Index, Data Types, Database, Database Administration, Database Design, SQL, SQL Server, Stored Procedures, T/SQL, Tables

During TechEd Europe I got a very scary phone call.  A very large table was throwing errors that the value being inserted into the primary key column was overflowing the data type that makes up that column.  In this case the data type in question was INT, so we were trying to stick the number...


November 17, 2012  2:00 PM

Backup Databases on Creation



Posted by: Denny Cherry
Backup & recovery, BACKUP DATABASE, CREATE TRIGGER, Data Loss, Database, Database Administration, DDL Trigger, Recovery, SQL Server, SQL Server 2008 R2, SQL Server 2012, T/SQL, Transactions, Trigger, xp_create_subdir

One of the companies which I work with has the occasion to create new databases when they do releases of their software.  Normally this isn't a problem, except that they are setup to use maintenance plans to handle the backup and pruning of their transaction logs.  As all the new databases are...


October 10, 2012  9:00 AM

Encrypting data in the same column



Posted by: Denny Cherry
Data Encryption, Data Loss, Data Security, Data Types, Database, Database Administration, Database Design, Database security, Encryption, Identity theft, Security, SQL, SQL Server, SQL Server stored procedures, Stored Procedures, T/SQL, Tables

I wrote a little while ago about the fact that sensitive data needs to be encrypted within the database for all applications.  This is the first technique that is available to you to encrypt data...


October 17, 2011  2:00 PM

Quick and dirty way to run a batch over and over



Posted by: Denny Cherry
SQL Server, T/SQL

Everyone has their favorite way or running a block of code over and over again.  If you have to run an entire batch over and over again there is nothing as quick and easy as using the "GO n" syntax.  When you put a number after the GO batch separator SQL Server Management Studio (as well...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: