Often when I am load testing an application with a client I want to check to see if there is any index contention in a database. To do this, I use the DMF sys.dm_db_index_operational_stats. For a good rundown on this DMF, I recommend reading Louis Davidson’s blog entry on sys.dm_db_index_operational_stats. Instead of repeating that content, … Continue reading Monitoring Index Contention With DMFs
Month: February 2009
Big Tempdb Table
This won’t be the most exciting post. But hey, it’s Monday! What’s exciting about that? Maybe someone will bring in donuts. Or maybe I should since I am still on my couch and not headed to the office yet. Anyways, every now and then I need a big table to test some code out on … Continue reading Big Tempdb Table
My First Computer and Favorite Old Games (OT)
Continuing this thread, I was tagged by Rob Boek to post about my first computer and and favorite games. The first computer that I had access to was a Commodore 64 that my dad purchased when I was probably about 10 years old. That thing was awesome! We had it all -- the monitor, keyboard, … Continue reading My First Computer and Favorite Old Games (OT)
Rounding Up to the Nearest 1,000
A co-worker came over and asked how to round up to the nearest 1,000. He tried to use ROUND but found that it always split between going up or going down depending on the value and the report he was working on always had to round up. Almost before he finished asking, actually before he … Continue reading Rounding Up to the Nearest 1,000
Things you Know Now…
Last week I was tagged by Jason Massie to write up a few things I wish I knew as a Junior DBA. The tagging was started by Mike Walsh a couple weeks back and has been making the rounds. Without much ado, here are some things that I’ve learned through the years that I’d wished … Continue reading Things you Know Now…
Troubleshooting Permission Issues with CREDENITIALS
I keep hearing this story and similar variations… ”On a dark and stormy night, I developed a SQL Server Integration Services (SSIS) package. It worked wonderfully on my desktop development environment. All the files were properly accessed and the data was processed in a magnificent matter.” ”But suddenly I deployed the SSIS package to production … Continue reading Troubleshooting Permission Issues with CREDENITIALS
Database File Information
I often go out to clients and have to do some quick analysis of the client’s SQL Servers. Below is one of the SQL scripts that I’ll use when I want some to give some quick feedback on whether the files and their properties are configured properly. Not a very tricky script but something that … Continue reading Database File Information
Change Trusted State of Foreign Keys
Ever want to change those foreign keys created with NOCHECK to CHECK? Not exactly an earth shattering requirement but having all of the foreign keys trusted helps keep the relationships in your databases solid. Exactly what a good foreign key should be doing. Changing the foreign key to trusted does have the risk of uncovering … Continue reading Change Trusted State of Foreign Keys
UPDATE – ORDER BY and Deadlocking
I was working on a deadlocking issue a few days ago at a client The transaction that was continuously getting deadlocked utilized three SQL statements to checkout and return rows from a queue for the client’s application. Before going into the problem here’s a little code to setup the tables for the examples: The SQL … Continue reading UPDATE – ORDER BY and Deadlocking
DMV Version of sp_who2
I put together a presentation on Dynamic Management Views (DMVs) a few months back and one of queries I put together for that presentation was a version of sp_who2 that provided similar results but used DMVs instead. The query has most of the same columns as sp_who2 with some additional items that I found useful … Continue reading DMV Version of sp_who2