SQL Server with Mr. Denny


January 2, 2012  2:00 PM

All hail Bill Graziano now known as El Hefe

Denny Cherry Denny Cherry Profile: Denny Cherry

Today (technically yesterday) begins the reign of the new president of the SQL PASS organization.  Taking the lead of the organization is someone who I’m happy to call a good friend, Bill Graziano (@billgraziano | blog).  I think that Bill will do a great job at the head of our organization and I can’t wait to see how he does.  Bill has quite a bit of experience with PASS having previously served at the VP of Finance and the VP of Marketing as well as several years as a member of the board of directors.

All hail our new SQL overload “El Hefe” may he treat us well during his reign.

Denny

January 2, 2012  2:00 PM

SQL Server 2012 Training Annoucement

Denny Cherry Denny Cherry Profile: Denny Cherry

I am please to announce the first of my SQL Server 2012 training classes being held March 19-22 at the Microsoft office in Los Angeles, California.  This isn’t a short class, but a 4 day training class which will cover installation, manageability, security, high availability as well as the new and improved BI features.

All the information about the class including the course outline and pricing are all listed on the class information page.  Seats for the class are limited so be sure to get signed up quickly.  If you sign up during January be sure to use the discount code “BlogReader” save $100 on the cost of the class.

I hope to see you at the class.

Denny


December 30, 2011  2:00 PM

Have a great New Years

Denny Cherry Denny Cherry Profile: Denny Cherry

It’s December 30th.  Who the hell wants to read technical blogs today.  God knows I sure don’t want to write one.

So I’m going to finish what needs to be finished for the year, play hooky for the rest of the day and be done with 2011.  I’m looking forward to 2012 in a big way.  I’ve got some big conferences lined up to speak at, some great classes and other events that I’m speaking at.

Have some fun this weekend and party like is 2012, because well it is.  We’ve earned it, and if you believe that Mayan’s it’s the last new years ever so go nuts.

Denny


December 28, 2011  2:00 PM

Just a few days left to rack up tax deductions

Denny Cherry Denny Cherry Profile: Denny Cherry

There’s only a few days left in 2011, which means that there is only a few days left to rack up tax deductions for the 2011 tax year.  Things like career development (like training classes) can usually be taken as tax deductions when you itemize your taxes.  Typically training events like SQL Excursions, SQL Skills Immersion Events, and SQL Cruise would count as tax deductions.  You don’t need to take the training in 2011, you only need to pay for the training in the 2011 calender year.  If you think that you may end up having to pay some taxes for this year, a great way to get some training and reduce your taxable income for the year 2011 all in one shot.

Of course you should check with your accountant to make sure that what you are paying for qualify as a tax deduction.

Denny


December 27, 2011  2:00 PM

Back To Basics: Why isn’t maintenace automatic?

Denny Cherry Denny Cherry Profile: Denny Cherry

One of the questions which I see pop up from time to time (especially when I used to work for a VAR that wrote software for small businesses) is why doesn’t SQL Server do the maintenance automatically?  Things like checking for corruption (DBCC CHECKDB), index defragmentation, backups, etc.

The reason for this is pretty basic.  How is the SQL Server supposed to know what settings to use, or how often to do those things?  Every database needs to have the indexes rebuild at a different interval.  There are a variety of recovery options which would change the backup policy for a database.  Not to mention that to properly build backup settings the SQL Server would need to know things like your RPO (Recovery Point Objective aka. how much data are you willing to loose in the event of a major failure).  Without a way to tell the SQL Server these sorts of things the SQL Server wouldn’t be able to properly maintain your environment.

So there’s the why.

Denny


December 22, 2011  2:00 PM

Fragmentation may cause corruption

Denny Cherry Denny Cherry Profile: Denny Cherry

Let me start this off by saying that I chose the title of this blog post very carefully.  You’ll note that it says “fragmentation may cause corruption” not that it will cause corruption, so before you go saying “Denny says that if you have any fragmentation of the database it’ll become corrupt” be sure to read the entire blog post.

I recently ran across a very interesting Microsoft knowledge base article titled “A heavily fragmented file in an NTFS volume may not grow beyond a certain size“.  The basic jist of this article is that if you have files, specifically large files (like oh say database files) which are VERY heavily fragmented you may get error messages back from the OS saying that there was a problem.  If you are running a Vista or newer Kernel (Windows Server 2008 and newer) you’ll see Error 665 (The requested operation could not be completed due to a file system limitation).  If you are running a kernel older than Vista (Windows 2003 R2 or older) you will see Error 1450 (insufficient system resources exist to complete the requested service).

The reason for this is that when a file is fragmented the NTFS file system needs more space than expected to save the location of the file allocations.  Information about the location of the allocations are stored within file records by the file system.  When there are multiple file records for a file the file system uses something called an ATTRIBUTE_LIST to store information about the file records.  The problem comes into play when we run out of ATTRIBUTE_LIST structures for the specific file.

There is no way to figure out if (or when) you are going to hit the error message.  The reason is that there is no way to figure this out is that it would require knowing the sizes of the fragments and knowing how these fragments are begin described within the file tables and the ATTRIBUTE_LISTs.

There doesn’t appear to be any real workaround for sparse files (which SQL Server users for DBCC and snapshots).  So if you start seeing these error messages your best bet will probably be to defrag the disk so that when SQL Server creates a sparse file the file isn’t fragmented.  Backing up the database and restoring it may help as well as the disk would no longer be fragmented.  In either case a call to CSS would probably be in order.  In any case this is just another good reason to pre-allocate your files so that all your free space on the disk is at the end, and not scattered through out the disk.

Denny


December 20, 2011  2:00 PM

Me, Sean and Jen all talking politics & more

Denny Cherry Denny Cherry Profile: Denny Cherry

So last weekend I had the chance to fly over to Dallas and hang with Sean and Jen McCown (the Mignight DBAs) and be the guest on their web show all live and in person for the episode “Bring in the Nerds“.  Sean has informed me that the recording it up on the site, and available for your viewing.  I get there about 10 or 15 minutes into the show, as I had a late flight out there.

Just do keep in mind that there was beer involved so the language might require headsets is there’s a manager or child around.

Denny


December 19, 2011  7:36 PM

Look out SQL Bits, here I come!

Denny Cherry Denny Cherry Profile: Denny Cherry

That’s right, I’m headed out to the SQL Bits conference in London, England.  Apparently I’ve been on my best behavior this year, because the guys at SQL Bits have even selected me to deliver a pre-con on the Training Day.

My training day class will be a full day presentation focused on Storage and Virtualization for the DBA (or other database professional).  So get signed up for the training day session and learn what you need to know to talk to the storage team so that they don’t look at you like you are a bumbling fool.  Don’t wait, get registered for SQL Bits and my training day session today.

I’ll see you there, I can’t wait.

Denny


December 19, 2011  2:00 PM

2011 Blog Post Wrap Up

Denny Cherry Denny Cherry Profile: Denny Cherry

With the end of 2011 quickly approaching, I decided to throw all the stats from this blog into Excel so I can see what the most popular blog posts that I’ve written are.  The results are pretty interesting and provide a bit of a view into what people are reading on my blog over the course of the year.

So the most popular blog posts that people have looked at this year are:

#1 – How To Configure DTC on Windows 2008

#2 – Back To Basics: The Update Statement

#3 – Back To Basics: Clustered vs. NonClustered Indexes

#4 – What Exactly Is MSDTC And When Do I Need It

#5 – New Insert Syntax in SQL Server 2008

#6 – Difference Between an Index And a Primary Key

#7 – SQL Server 2012 Licensing Changes

#8 – If You Aren’t Doing Backups You Aren’t Doing Your Job

#9 – Single Instance vs. Multiple Instance

#10 – You Can’t Deploy A SQL 2008 SSRS Report to a SQL 2005 SSRS Server

When I was looking at the data for these blog posts I thought it was kind of interesting that the things that people was to read about the most are MS-DTC, and the more intro level material.  So I’m going to take this information and attempt to use it over the course of 2012 and write more towards the kinds of things that people are looking for.  I can only assume that people are finding these blog posts via search (some of them like the DTC posts are a couple years old at this point) so these are the kinds of things that people want to see.

Another interesting thing that I saw was that over the course of 2011 the page views for the most popular pages varied widely.  The most popular post (the DTC post) had over 18k page views this year, while #10 (the SSRS post) had just a little over 3k page views.  That is quite a wide gap between the two (technically the second most popular page that people viewed was the home page of my blog as that came in at #2, but I excluded that from the list because who knows what they were reading).

If you have a blog I encourage you to look at your metrics if you aren’t already and see what people are reading, then write more about that topic.  Exclude the outliers, like my SQL 2012 licensing post, that are one offs and that you know don’t need to be beat on week after week, month after month.  But when you are writing about topics, make sure that they are interesting to you (if they aren’t then the posts will be bland and boring to your readers) and that you are putting your own spin on the topic, not writing about the same stuff that everyone else has written.

Denny


December 15, 2011  2:00 PM

3rd Party Performance Monitoring Tools & CXPACKET

Denny Cherry Denny Cherry Profile: Denny Cherry

There are lots of great 3rd party monitoring tools on the market from a variety of vendors.  I want to start this post by saying up front that I’m not bashing them, or throwing stones.  That said…

Some of the time these third party apps don’t handle reporting CXPACKET waits very well.  The reason for this, usually, is that the third party apps typically show the waittype of the thread which has been waiting the longest for that session.  Often this will be the CXPACKET thread.  Because of this it can be hard to use the 3rd party apps to find the actual root cause of the problem.

To find the root cause of these problems which look like CXPACKET problems you need to find the threads which aren’t waiting on CXPACKET.  There are a few ways you can do this, probably the easiest is to query the sys.sysprocesses dynamic management view.  While this view is deprecated it isn’t going anywhere yet and when it does you can still get this information from the other DMVs.  Simply query sys.sysprocesses (or dbo.sysprocesses if you are on SQL 2000) using the problem SPID as the WHERE clause.

SELECT *
FROM sys.sysprocesses
WHERE SPID = {Some Session ID}

You can then look at all the wait types that are being reported for that SPID and what other the other wait types are is the problem.  Typically when I see this it’s usually an IO wait type or SOS_SCHEDULER_YIELD.  If the problem is SOS_SCHEDULER_YIELD then (in my experience) you’ve probably got an indexing problem that needs to be resolved.  You’ll then want to grab the execution plan for that query (sp_whoisactive is a great way to get the execution plan using the @get_plans=1 parameter) and figure out the missing index problem.

Now there can be other reasons that you’ll be CXPACKETed, so please don’t think that this will work every time. But it should work a lot of the time.

Denny


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: