SQL Server (RSS)

Attending the PASS Summit

Steve Jones makes some good points in his blog post Training. I find it difficult to believe the short-sightedness of some organizations when it comes to training events like the PASS Summit.

This year's Summit - like all previous years to date - had enough top notch presentations and labs to make it worth the cost of admission, travel and expenses, and the cost of allowing a database professional to leave work for three days combined. More than enough.

Like Steve, I don't get it.

Also like Steve, I bet we'll see these DBAs at the 2008 PASS Summit in Seattle - and working for another company.

I wonder if those responsible for denying database professionals opportunities for training factor in the cost of hiring and training a new DBA every six to eighteen months?

:{> Andy

Technorati Tags: EMPs Database Professionals PASS Training Changing Jobs

Getting Ready For The PASS Summit!

The PASS Summit is less than two weeks away!

I'm getting ready for my presentations. I need a couple laptops to host virtual servers for the demos, so I bought some new gear to take with me.

Check out my Network-In-A-Bag!

Network in a bag!

It's a power strip, a couple CAT6 cables, power supply, and a NetGear 1G 5-port switch - all in a 1 gallon Ziploc bag.

:{> Andy

Technorati Tags: PASS Summit 2007 Networking

Iteration = Maturity

Introduction 

I was recently reminded that iteration matures software.

The History of Andy, Part 1 

Like many DBAs, I was a software developer in another life. I built web applications - working my way up from HTML through DHTML and finally to ASP - and could regale (and bore) you young whipper-snappers with war-stories of how things were "back in my day". [/DanaCarvey]

But I won't.

The Times They Are a-Changin'

I'll share instead something I've witnessed many times since starting with software in 1975 - and something you probably already know: stuff changes.

And thank goodness stuff changes!

I recently ordered 1G of RAM from an online retailer. It should arrive before my next son (but that's not a given as Riley refuses to provide a tracking number - the doctors will induce Christy into labor Friday if he hasn't been born by then - but I digress...). I remember my neighbor John, who introduced me to computers, purchased a 256-byte RAM chip in the mid-1970s for about what I paid for the 1G. That's 256 bytes of RAM - not a typo. As I recall it was either a 14- or 16-pin IC.

Things have changed since then. Improvements in technology, brought about by building and improving upon existing knowledge, have brought us to a day when I can purchase 1,073,741,824 bytes for roughly the previous price of 256. I don't know how you feel about that. I think it's a good thing.

The idea of "building and improving upon existing knowledge" defines iterative development. Although the idea is relatively new to the software development field, it serves as the basis for engineering disciplines. Engineers iterate - build and improve upon existing knowledge - and we get more powerful hardware for the same amount of money. What's not to like?

Iteration - it's not just a good idea... 

Iterative software development builds and improves upon existing knowledge within a specific domain. Most domains are defined by an application (wholly or in part), enterprise knowledge (again, wholly or in part), or - most likely - some combination of the two. For example, let's say you work for a large corporation as a software developer. Your domain could be the corporate website. In which case you possess knowledge about the business of the corporation and web development. You mix these together to do your job. In this case, you will probably pick up marketing savvy and current trends along with the latest AJAX techniques.

As you make successive passes (iterations) through the website design interacting with marketing, your domain knowledge is built and improves. As your domain knowledge increases, the website will become more valuable to the corporation - as will you.

Iteration adds value.

Got Iteration?

The same can be said for database development.

Perhaps you've experienced this in your own database development efforts: you receive a request for a database design to meet some desired functionality. Or you're handed a design and asked to optimize it. Or maybe even you had an idea to capture data - performance metrics or something similar - and you're designing a database solution to accomplish this.

You get into the development a few hours or a few days and realize a little tweak here or there would improve performance, or readibility, or better adapt the design to your intentions. So you make the tweak and continue.

This improvement leads you to re-examine other portions of the design and you make more tweaks. Maybe your last change broke things. Maybe you see an opportunity to add a parameter to a stored procedure and combine the business logic of three stored procedures into one.

A "Growing" Solution 

Pretty soon, you have iterated enough to feel comfortable promoting, integrating, or even releasing the results - letting the effort move to the next step.

Depending on the nature of your efforts, it may not end there. If your database development is the back end of a larger application - say, the corporate website, for example - there will likely be requests for changes over time as the site grows (scales) in complexity and size.

When the requests come in you are not likely to start over. You will most likely build and improve upon your existing knowledge. You will most likely iterate.

Scaling forces iteration.

Voilà

This is how solutions mature - be they applications, databases, or both - regardless of who writes them or how many are involved in the development effort. It doesn't matter if the development team is one lady in a cubicle in the European Union or a development team of thousands at Microsoft.

Iteration matures software.

:{> Andy

Meltdown!

A couple days ago the Vista Ultimate instance on my laptop when all Klingon on me: it was "a good day to die."

I'll never know why for sure. Indications point to COM+ and VMM giving up the ghost. They were good systems, may they rest in peace.

I tried to revive the old OS. It would run in Safe Mode and even Safe Mode with Networking, but that's just not the same as having all the functionality I know and love.

I've spent the last couple days (and nights) rebuilding a second instance of Vista Ultimate on the same machine. I'm about half done at this point. Today is SQL Server instances and Visual Studio Team System day.

It's not just the installs, there's the service packs and updates after the installations. Lots of installing.

But it's also an opportunity to rebuild the machine with a different configuration.

Back to installing...

:{> Andy

Technorati Tags: Vista Re-install

SQL Server 2005 Books Online Update

There's an update to SQL Server 2005 Books Online available.

Major changes include information regarding installation of SQL Server Express SP2 on embedded systems and updates on the WITH ENCRYPTION topic.

:{> Andy

Technorati Tags: SQL Server 2005 Books Online

RowCount and Stored Procedures

Recently I thought the SQL Server RowCount functions were lying to me - telling me there was only one row being returned by stored procedures that performed Select statements only - Select statements that I knew returned more than a single row.

I discovered the culprit after some digging: the Return statement at the end of the procedure was, in fact, returning 0 - which is technically one row.

:{> Andy

Technorati Tags:

SQL Server 2008 CTP Available!

The June CTP of SQL Server 2008 (the database server formerly known as Katmai) at Microsoft Connect!

Registration is required. You must also complete a three-question survey.

:{> Andy

Technorati Tags: SQL Server 2008 Katmai CTP

Notes On Project Success - Part 2, to Stake-Holders

Yesterday, I addressed Technologists regarding Project Success; today I address Stake-holders.

I have participated in projects that have succeeded and in projects that have failed. One thing I noticed about the failed projects: expectations were poorly - or not - managed.

What are examples of project expectations?

  • Functionality - when completed, the application / upgrade / database / server will allow me to perform xyz.
  • Time - how much time one expects to develop the functionality. Can also include a schedule for deliverables and / or milestones.
  • Expense - how much one expects to pay for the functionality.

As a stake-holder you know what you want. And you can probably communicate your expectations - using the three areas above as a guide - effectively. Issues arise when, for whatever reasons, there is a disconnect between your expectations and the those of the IT team tasked with performing the work.

I've witnessed several unsuccessful executive responses to the disconnect scenario:

  • "Ostritch" - ignoring the disconnect in hopes it will disappear with time.
  • "Gambler" - belief that there's a big score (project or technical break-through) just-around-the-corner that will save the day.
  • "Taskmaster" - belief that threatening people is the way to motivate them to work around challenges.
  • "More-Resources" - a firm belief that more resources can solve any problem known to humanity. (I often imagine these folks live in subdivisions and get their neighbors to help mow their lawns. In my mind I see forty push-mowers aligned wheel-to-wheel along one edge of a lawn. On signal, they all puch across the lawn, mowing it from end to end in a single pass...)

I worked for a company that decided to employ Performance-Based Management techniques to a successful team. They actually applied the concept company-wide, regardless of whether the teams were successful or not. In this particular flavor of PBO, 20% of employees were considered outstanding, 60% were satisfactory, and 20% were acceptable losses that the company would be better without. These numbers were set in stone and never changed.

My questions were:

  • Who failed? Did HR fail 80% of the time by hiring mediocre to poor employees? or did our management disillusion and de-motivate these people into their non-excellent state?
  • Are we, in effect, planning to never get better?

Statistical control works on processes, not people - at least not well on people.


So what is the solution?

Communication.

It's that simple. Executives have to either be approachable by the IT team or someone representing them, or you must appoint someone to be approachable in your stead. Leadership dynamics (or just plain scheduling issues) may require you to appoint someone. If so, try to find someone who speaks both business and technology.

Realize that sometimes you do not know what you do not know. I run a couple small corporations and have an appreciation for the amount of work involved in merely administering such an entity. I also know technology changes every day. It's difficult for anyone to keep up - especially if you're minding stock-holders, regulators, and the lot. We may have moved beyond the technology you understand. If we haven't, we will soon.

Either hire people you trust or trust the people you hire. If someone violates the trust, respond accordingly. But do everything within your power to exude trust-worthiness as well as trusting-ness.

For truly innovative people to be free to succeed, they must first be free to fail.

The best tools were once toys. IT professionals are notorious tinkerers. You will be astonished at the return on investment for a weekly-scheduled hour of "play time" for developers.

:{> Andy

Technorati Tags: Software projects Success Failure Technologists

Notes On Project Success - Part 1, to Technologists

There was a very interesting article posted not long ago at SQL Server Central by Janet Wong entitled My Projects Have Never Failed.

In the article, the author explains projects that experienced varying degrees of success for various reasons - but in all cases a disconnect existed between the end-user or customer expectations and the delivered product.

Personally, I consider these projects failures.

Here's why: The stake-holder or executive has this expectation. It may be very unrealistic, but they hold it nonetheless. They may be very educated people or not. They may understand technology or not. None of this impacts the fact that they hold expectations.

Q: Who's in charge of communicating realistic expectations?

A: Technology people.

Or at least a member of the technology team.

A good technology team has several moving parts and people fulfilling different roles.
Note: If you're a one-person-show, this post is not about you.

At least one person on the team needs to be customer-facing. That person needs to be an expert in communicating with business people who hold unrealistic expectations. Make no mistake: this is a talent and an art.

Good communicators are rare in life, rarer in business, and practically extinct in the technology sector. Most good communicators abandoned IT departments decades ago and moved into sales where they could enjoy salaries orders of magnitude beyond what IT departments will pay them. But I digress...

I don't blame my customers when their expectations go unmet - I blame myself. Had I communicated something better - or even differently - the outcome would likely have been better for everyone.


So here are some tips for communicating with project stake-holders / executives:

  • You may understand what you mean when you say "Third-Normal Form Relational Database" at a meeting with executives, but few of them will. It's not their job to understand - that's why they're paying you. Step up. If you cannot translate your conversation into executive-speak, let someone else do the talking. If your point is to embarrass the executives, you'll probably not try that at your next job.
  • Identify someone on your team (or add someone to your team) to serve as a point-of-contact to the executives. If your team has a project manager, they may be the best person to do this. I've also seen horrible project managers who exacerbate the problem with their own inability to communicate (or worse yet, take the side of the stake-holders and hang the development team out to dry).
  • Keep it short.
  • Keep it as simple as possible. Stake-holders and executives do not need to know the history of iterations you went through to arrive at your conclusion. Take it as a sign of confidence in your abilities that they accept your judgment on the matter.
  • Stake-holders and executives have different priorities from you and I technology people - remember that.
  • If you deliver quality late, no one remembers. If you deliver junk on time and under budget, no one forgets.
  • The old consulting axiom ever applies: Under-promise, over-deliver.

This is business. This isn't academia; you do not get to interpret your own results.

It's not a success unless they believe it to be a success.


Me, I've had projects fail. Some of them have been spectacular in the scope of their failure. To date, I've stepped up, admitted the failed status of the project along with my errors, and promptly moved to correct the issues. I've found excuses to be a waste of my and my customer's time.

Having a project fail is bad enough; failing to manage the failure takes it to the next level.

Remember, if you fix it, it will be ok.


Tomorrow, I address Stake-holders.

:{> Andy

Technorati Tags: Software projects Success Failure Technologists

Managing The Thing You Cannot Touch

Yesterday I wrote about The Thing You Cannot Touch. Today I'm going to tell you some ways to manage the situation.

First, try to determine why You Cannot Touch The Thing. This is invaluable information in charting the waters ahead - especially if you're consulting.

Second, accept the fact that there's better than a 90% chance that you will not, in fact, be allowed to Touch The Thing. In my experience, three things must be true for you to overcome the business friction imposed by The Thing:

  • You have to try everything else first.
  • Everything else must fail to sufficiently address the issue.
  • The source of the issue must be mission-critical.

Regardless, your best knee-jerk reaction is acceptance. This is tough for a professional. In your heart of hearts you know what it takes to solve the real issue. And yet, you've been told You Cannot Touch It.

The good news? There's also a better than 90% chance you can find a way to solve the issue - or at least alleviate the client's pain - without Touching The Thing.

Modern enterprise applications are comprised of lots of moving parts. The Thing is probably not the sole source of pain. Addressing other bottlenecks may do the trick - at least for now.

And, if you're the person they called last time they had an issue and you solved it (and weren't "difficult" to work with), you'll likely get the call next time.

How cool is that?

:{> Andy

Technorati Tags: Consulting Software Development Satisfying The Customer Leveraging New Business

The Thing You Cannot Touch

I have this theory about consulting. I call it The Thing You Cannot Touch. Since a few friends have found it amusing I thought I'd share. It goes like this:

A potential client contacts your firm. A conference call is arranged to discuss the issue. During the call, the issue is defined. Resolution theories and attempts to date are shared, along with their results. The current status is explained - along with

The Thing You Cannot Touch.

Sometimes an attempt at justification accompanies the announcement: "We know it can't possibly be _______ so we're not going to waste any time looking at it."

Other times, it's just put out there for what it is: "You can't touch _______."

My experience has shown the heart of the issue almost always lies with The Thing You Cannot Touch. It needs to be fixed but someone, somewhere, for some reason does not believe it to be so - and so it Cannot Be Touched.

Sometimes it's political - It's someone's "baby". They built this application just ten short years ago - worked nights and weekends and toiled and sweated and bled to make it work - and rode it all the way to CIO, after all. Who are you, lowly consultant, to tell them VB 6 code should be re-written in this new fad known as .Net? Doesn't Vista support VB 6 until the mid-20-teens?

Sometimes the decision-maker doesn't understand the differences in the technologies.

Sometimes it's a purely market-driven business decision - and the decision-maker is right and justified in choosing to keep hands off The Thing. It's not all about technology folks... it's sometimes about what I like to describe as the (little "s") software (big "B") Business.

If you find yourself on a consulting conference call and The Thing You Cannot Touch comes up, pay attention. Tomorrow I tell you how to Manage The Thing You Cannot Touch.

:{> Andy

Technorati Tags: Consulting Software Development Thing You Cannot Touch Old Code Outdated Code VB 6

Benefits of 64-bit SQL Server

There's an interesting post out at the SQL Programmability & API Development Team Blog about 64-bit performance enhancements entitled Will 64-bit increase the performance of my SQL Server application?

Interesting stuff - a recommended read.

:{> Andy

Technorati Tags: SQL Server 2005 64-bit performance improvement

Tim Tatum's T-SQL Presentation

Tim Tatum did a great job presenting to the Richmond SQL Server Users Group last night! Last night's meeting also set a new attendance record - it was a great night.

Tim thought his topic wouldn't be well-received since most of our presentations focus on SQL Server 2005. Truth be told, there's still quite a market out there for SQL Server 2000. The platform is stable and still meets the database needs of most organizations.

SQL Server 2005 performs better, is more scalable, and has some very interesting and useful features. Not all organizations have a need for SQL Server 2005, and some will not upgrade until mainstream support ends in less than a year.

:{> Andy

Technorati Tags: sql server Tim Tatum Richmond SQL Server Users Group T-SQL

SQL Provisioning Tool (SQL Server 2005 SP2)

At the end of the SQL Server 2005 SP2 installation you may be prompted to launch the SQL Provisioning Tool. This utility makes members of the local administrators group SQL Server sysadmins - which is cool, especially if your instance security is Windows Authentication only.

If anything "bad" happens during the provisioning process, the utility simply shuts down.

By "bad" I mean things like the tool attempting to access a service you shut down. Note: you may have shut down this service because you were prompted the file was locked during an earlier step in the Service Pack installation.

When you search for the Provisioning Tool in the Start Folders you will note it isn't there.

You can find it with diligent searching (or by reading this blog): It defaults to [Installation Drive]\Microsoft SQL Server\90\Shared\SqlProv.exe. On my machine I installed SQL Server on the C:\ drive so my path to SQLProv is "C:\Program Files\Microsoft SQL Server\90\Shared\SqlProv.exe".

Re-executing the tool doesn't seem to cause any negative impact, but I haven't conducted rigorous testing.

:{> Andy

It's MVP Day

So far as I know, MVPs are annouced the first day of each quarter.

Congratulations to Frank La Vigne who was re-awarded Tablet PC MVP for another year!

Update! Darrell Norton was renewed as an ASP.Net MVP!

Congrats also to David Silverlight, the brains behind Community Credit, XML PitStop, NonProfitWays, Code Camp Evals, and many other cool websites - at least one of which he's asked me not to talk about yet! David was also re-awarded as an XML MVP.

I was nominated for Q3 / 2006 but not awarded. I was disappointed but understood: the process looks at your community involvement over the past year, and I sort of "came out of nowhere" a few months earlier.

I was fortunate enough to be nominated again earlier this year. And today I received the news I was awarded SQL Server MVP! The email arrived around 4:30 AM EDT. I was up until 3:45 AM EDT polishing off my Testing The Database chapter for the upcoming Wrox book: Professional Software Testing with Visual Studio 2005 Team System: Tools for Software Developers and Test Engineers - so I almost knew about it real-time!

It's a huge honor and I am humbled and overwhelmed all at the same time.

:{> Andy

Technorati Tags: About Andy MVP SQL Server

When to Test

All software is tested. Some of it is tested before it's deployed, some immediately thereafter.

;)

It's always good to test before deployment. It's even better to test deployment itself.

I'm honored to be part of a really cool team of Test Engineers / Authors writing Professional Software Testing with Visual Studio 2005 Team System: Tools for Software Developers and Test Engineers (Wrox). I'm not sure about similar books in the marketplace (one bad thing about writing is it consumes all my reading time!). This book is written for individuals and teams developing software using Visual Studio Team System. And it will help you understand when and why to test (before deploying, even!).

I know this is a great book - I've been reading the chapters as they're turned in! The other three authors are testing gurus. Not only are these guys very good Test Engineers, they're also cool people. It's been an honor to work with Tom, Dominic, and Mike.

This has been a fun writing project!

:{> Andy

Technorati Tags:

Applying SQL Server Service Packs and HotFixes

Some notes about the SQL Server Service Pack Installation Engine. I like it - a lot. The new engine goes to great lengths to prevent my having to bounce a physical server to apply a service pack. No matter how you slice it, it takes less time to stop and restart a service than restart the server.

You will reach a point in the installation where the following dialog displays:

If I were to suggest one change for the SQL Server Service Pack installer, I would suggest disabling the Next button until the check is complete on this "Checking for locked files" screen. A lot of people have been conditioned by disabled buttons to click-if-it's-enabled. So they see the Next button available and just click through this step. The step allows you to do this and stops the check for locked files. However...

  • Some Service Pack (or hotfix) patches may not be applied as a result.
  • You may be required to reboot the server to complete the Service Pack (or hotfix) installation.

So for now, no blindly clicking the Next button!

When locked files are discovered the dialog displays something like the following:

My advice: Stop here, open Services and stop each of the identified services manually. After each has been stopped, click the Refesh button and you should see the next screenshot:

If you do not see this screenshot, you haven't stopped all the impacted services. Rinse and repeat until you get a "No locked files found" message. Then click the Next button.

As installation progresses you will see a screen similar to the following:

This screen shows you what's being updated and gives an indication of progress. Progress indications good.

When the Installation Progress indicates all is complete, click the Next button to proceed. A summary displays all SQL Server-related services and their Service Pack / HotFix disposition:

Be sure to restart the services you manually stopped before proceeding!

This explains why some service pack installations don't "take." If you believe you've installed an SSIS SP, for instance, but are still seeing that pesky issue that was supposedly resolved, this could be why.

:{> Andy

Technorati Tags: SQL Server 2005 Applying Hotfixes Applying Service Packs SP2

SQL Server 2005 SP2

There was a bug in the initial release of SQL Server 2005 SP2. One of the fixes added the "Hours" unit of measure to the enumeration of Maintenance Plan scheduling intervals. Something happened when adding the new item. Since "days" was previously the lowest unit of measure and "hours" was now the lowest unit of measure, days were converted into hours (kind of like the "by the book" scene in Star Trek 2: The Wrath of Kahn).

This was bad because stuff scheduled to run every day before applying the service pack was now running every hour after application.

Microsoft fixed the bug and re-released SP2. There's been some discussion about the manner in which they went about it but I will not delve into that here. It's fixed - let's apply the fix and move forward.

You can see information about the bugs fixed by reading KB921896. If you downloaded and applied SP2 before 5 Mar 2007, you only need to apply the Critical Update for SQL Server Service Pack 2. Read KB933508 for details.

SQL Server 2005 SP2 RTM took several components to version 9.00.3042.00. The Ciritcal Update takes them to 9.00.3050.00.

Thanks to fellow Solid Quality Mentor Ashton Hobbs for pointing this out.

:{> Andy

Technorati Tags: SQL Server 2005 SP2 Hours Days Maintenance Plans

Roanoke Code Camp - Time for me to present!

Well, I have to go prepare to present!

I may blog more later - if I don't, Robin Edwards and the Roanoke Code Camp team really did a great job!

:{> Andy

Technorati Tags:

Roanoke Code Camp - Rob Ericsson - SQL Server 2005 XML Datatype

Rob Ericsson is presenting on the xml Data Type in SQL Server 2005.

As I arrive, Rob is explaining xml data type conversions: you can convert from text to xml, but it's very difficult to convert back.

Rob dives into a comparison between SQL Server 2000 and SQL Server 2005 xml functionality. It's nice that SQL Server 2005 gives us the option of formatting the XML into elements - where we were limited in SQL Server 2000 to an attribute-based format. By adding ",xmlschema" to the query, we can generate a schema along with the data - how cool!

Rob is a great speaker!

:{> Andy

Technorati Tags: Roanoke Code Camp Rob Ericsson XML data type SQL Server

Roanoke Code Camp - Tim Tatum - T-SQL

Tim Tatum of Core Consulting is presenting Transact-SQL.

I met Tim and his lovely wife Sharon at the Speaker Dinner last night - they're good people.

Tim's a former school teacher who went back to school to obtain and MBA with an IT focus. I've met a lot of top IT professionals who were once in other careers and later moved to IT. In my opinion, these folks bring a diversity to the field like nothing else.

I learned Tim lives just up the road, so I've already bugged him (last night) about speaking at the Richmond UG meetings.

Tim is speaking on the fundamentals of SQL Server development and design. This is so very important. Why? Whenever I go to a new client who is experiencing performance trouble, inevitably they have designed something in violation of some fundamental.

Tim is, probably because of his teaching background, an excellent speaker! He breaks things down very well and has a soothing delivery style.

Good job, Tim.

:{> Andy

Technorati Tags: Roanoke Code Camp Tim Tatum Core Consulting

Roanoke Code Camp is Tomorrow!

I just got back from the Roanoke Code Camp Speakers Social - what a blast!

I met several of the speakers tonight and I am very impressed with the line-up!

If you haven't signed up yet there's still time! You can register here and show up tomorrow! It's going to be a beautiful day in the Star City tomorrow, and some serious knowledge will be shared by a stellar group of speakers!

I will be there, and hope to see you there as well!

:{> Andy

Technorati Tags: Roanoke Code Camp Developer Community Roanoke Valley SQL Server User Group Roanoke Valley .Net User Group

Everything Scales

The tune to a Bush song is running through my head as I type this... the band, not the president - although imagining the President singing the song is an interesting brain-stretch.

It's a fact of IT life that everything scales. Some successfully, even. Problems start when things do not scale successfully (or well). It happens in business. It happens with software systems.

When it happens with businesses, you hear things like "They grew too fast." When it happens with software systems, you browse to a website and receive an HTTP 500 or 404 error.

Can this be avoided (in business or software)? I think that's an excellent question - one well worth examining.


The answer, I believe, lies with how predictable the scalability is.

Consider a database application: If you know which tables are going to grow, how, and how much, you can plan for said growth. How would you plan? You could partition the tables using one or a combination of partitioning techniques. You could appropriate filegroups, snapshots, and a host of other functionality. If you only you knew where to apply these techniques.

That's the key.


Achieving scalability starts with capturing metrics. If you know how your database is growing from the beginning - if you can chart the growth of individual tables, access patterns, and internal performance data - you can predict growth and manage scalability.

So the key is measurement.

Measurement is an engineering discipline in its own right. The field of applied measurement is called Instrumentation. Applying measurement to a process is referred to as "instrumenting the process."

How do you instrument a database process? Iteration 1 would include creating an internal table to house and maintain process metadata:

CREATE TABLE dbo.ProcessData
(ProcessDataID int IDENTITY(1,1) NOT NULL,
ProcessDataDateTime datetime NULL CONSTRAINT DF_ProcessDataDateTime DEFAULT (getdate()),
ProcessDataIndicatorName varchar(50) NULL,
ProcessDataIndicatorValue varchar(50) NULL,
ProcessDataIndicatorStatus char(1) NULL CONSTRAINT DF_ProcessDataIndicatorStatus DEFAULT ('C'),
CONSTRAINT PK_ProcessData PRIMARY KEY CLUSTERED (ProcessDataID)

If your instrumented process is stored-procedure-based, you could add INSERT statements to your existing stored procedures. Consider instrumenting a parent stored procedure that calls child stored procedures. The instrumented proc could look like the following (instrumentation emphasized):

CREATE PROCEDURE dbo.SomeProcess
AS

begin

INSERT INTO dbo.ProcessData
(ProcessDataIndicatorName,
ProcessDataIndicatorValue)
VALUES('ChildProc1','Starting');


EXEC dbo.ChildProc1

INSERT INTO dbo.ProcessData
(ProcessDataIndicatorName,
ProcessDataIndicatorValue)
VALUES('ChildProc1','Ending');

INSERT INTO dbo.ProcessData
(ProcessDataIndicatorName,
ProcessDataIndicatorValue)
('ChildProc2','Starting');


EXEC dbo.ChildProc2

INSERT INTO dbo.ProcessData
(ProcessDataIndicatorName,
ProcessDataIndicatorValue)
VALUES('ChildProc2','Ending');

INSERT INTO dbo.ProcessData
(ProcessDataIndicatorName,
ProcessDataIndicatorValue)
('ChildProc3','Starting');


EXEC dbo.ChildProc3

INSERT INTO dbo.ProcessData
(ProcessDataIndicatorName,
ProcessDataIndicatorValue)
VALUES('ChildProc3','Ending');


end

Before moving forward, removing code duplication would be a worthwhile effort. In application development, this is one of many processes generally referred to as Refactoring.

The INSERT statements are a prime candidate for refactoring and we can address this with a stored procedure:

CREATE PROCEDURE dbo.AddProcessData
@ProcessDataIndicatorName varchar(50),
@ProcessDataIndicatorValue varchar(50)
AS

begin

INSERT INTO dbo.ProcessData
(ProcessDataIndicatorName, ProcessDataIndicatorValue)
VALUES(@ProcessDataIndicatorName, @ProcessDataIndicatorValue);

end

Now the parent stored procedure instrumentation above can be modified to look like this:

CREATE PROCEDURE dbo.SomeProcess
AS

begin

EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc1', @ProcessDataIndicatorValue='Starting';

EXEC dbo.ChildProc1

EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc1', @ProcessDataIndicatorValue='Ending';

EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc2', @ProcessDataIndicatorValue='Starting';


EXEC dbo.ChildProc2

EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc2', @ProcessDataIndicatorValue='Ending';

EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc3', @ProcessDataIndicatorValue='Starting';


EXEC dbo.ChildProc3

EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc3', @ProcessDataIndicatorValue='Ending';

end

Much better.

Measuring the current process provides a baseline - the first step in a continuous improvement process that will provides dynamic design changes, performance monitoring, and - eventually - a dynamically-scalable system. It also supplies the current performance status against which we can benchmark future improvements and modification.

:{> Andy

Technorati Tags: Bush Scalability Database Instrumentation

Vista and SQL Server Mixed-Mode

I've been traveling the continent the past few months warning people of the evils of SQL Server Mixed Mode authentication. I recently (this past weekend) procured a snappy new Gateway laptop with Vista installed.

It turns out SQL Server 2005 installed on Vista does not automatically add members of the local Administrators group to the SQL Server role BUILTIN\Administrators. Rather than waste lots of time reading the readme files, I discovered this when I tried to connect to freshly-installed SQL Server instance.

So after re-installing SQL Server in Mixed Mode and logging in as sa, I was able to add myself as a sysadmin. Afterwards, I changed the instance from Mixed Mode to Windows Authentication. Windows Authentication is still more secure.

Thank you, Slammer worm...

:{> Andy

Technorati Tags: SQL Server 2005 Vista Mixed Mode Windows Authentication security Slammer

I will present SQL Server Tips and Tricks 8 Feb 2007

After the Freezing Redneck Tour 2007 wraps up this week, I'm looking forward to the next meeting of the Richmond SQL Server Users Group.

I've decided to present on SQL Server Tips and Tricks. I have three topics in mind:

  • SqlClr
  • An Introduction to Incremental Data Warehouse ETL with SSIS
  • A surprise topic!

Trust me, if you work with SQL Server data warehouse ETL you will like the surprise. ;)

Hope to see you there!

:{> Andy

Technorati Tags: Developer Community Richmond SQL Server Users Group SqlClr Incremental ETL

SQL Programmability and API Development Team Blog

If you work with SQL Server and haven't checked out the SQL Programmability and API Development Team Blog, you should. Now. Immediately. I'm not kidding.

It's simply awesome!

:{> Andy

Technorati Tags: SQL Server Programmability API Development blog

SQL Snack

...from theDailtyWTF: Chocolate Covered SQL


...spaces in the table and field names. Easier to read or just three extra characters to type?

Thanks Frank for sending me this!

:{> Andy

Technorati Tags: SQL humor raisins chocolate

A couple changes!

I've started a new blog: Applied Business Intelligence!

I will continue to blog here about Team System topics. I'll probably continue to share personal stuff here as well - I'm debating that...

I've also changed my login here at VSTeamSystemCentral.com. I'll no longer be posting as that dry and boring "admin" guy - now I'll be posting as me!

:{> Andy

Technorati Tags: New blog Applied Business Intelligence BI SSIS ETL Reporting Services

Randy Franklin, SQL Server Notification Services, Tonight!

Randy Franklin presents an introduction to SQL Server Notification Services tonight at the January Meeting of the Richmond SQL Server Users Group!

The meeting will be held at the Markel Facility, 4600 Cox Road, Glen Allen. It starts at 6:30 PM and the public is invited.

Randy has been digging into SSNS for a while now and shares tips and tricks about this service for SQL Server 2005. Come on out this evening - bring a friend!

The pizza is free!

This month's sponsor is
Richmond Code Camp 3!
Richmond Code Camp 3!

Richmond Code Camp 3 will be held 28 April 2007 at ECPI-Innsbrook.

:{> Andy

Technorati Tags: Developer Community SQL Server Users Group Notification Services Richmond Code Camp

2006 - the Year in Review

This is probably my last post of 2006. It's been a good year. Not perfect, but very good.


SQL Server 2005 got lots of traction in the industry. Most SQL Server technologists I know agree five years was a long time to wait for a new release, but the feature set matches or exceeds the development effort.

Most shops I deal with have either migrated, are testing 2005, or have plans to in 2007.

SQL Server 2005 Service Pack 1 was released and Service Pack 2 is on its second CTP.

Team Edition for Database Professionals - aka Data Dude - went from CTP1 to RTM in six months. Very impressive development cycle!


It's been a good year for the Richmond Developer Community.

We started a new SQL Server Users Group, which is now the official PASS chapter for Richmond, VA! We also held two successful MSDN Code Camps - and the leadership team is planning more for 2007.

Speaking of leadership, the team did an outstanding job in 2007 - thanks to all who led and participated at every level! You folks rock!


Personally, it's been a good year too.

Christy and I bought a house in Farmville, VA - completing our move from Jacksonville, FL back home to Virginia.

We recently learned we're going to be parents again! :)


Business-wise, it's also been a cool year.

I moved from a temp-to-perm position to a permanent consulting gig, and was then recruited by Solid Quality Learning! The relationship with Solid Quality allows me to be an independent consultant. It's nice to be working for me again, although my boss is sometimes a jerk... ;)

I learned a couple difficult lessons as well. Without going into detail, suffice it to say this year affirmed my long-held business standards regarding the importance of integrity, loyalty, and trust. At my age and with my experience with people and in the industry, I am not often surprised by people - but I was surprised this year. My lovely bride Christy has an applicable saying about such times: "Good judgment comes from experience, and experience comes from bad judgment." Amen. I believe it is best to always treat people as you want to be treated because you never know...

I also experienced new levels of trust and respect. I worked with an incredibly talented team on a cool project. Loyalty was a hallmark of our experiences on the team. The result? Against seemingly insurmountable odds and obstacles, both internal and external, we succeeded - and made it look easy! My experiences at Solid Quality Learning have underscored the value of loyalty and integrity in all we do. The professionals that lead this company are at once the most talented, intelligent, down-to-earth, humble, and open people on the planet. It is an awesome honor to be part of this organization!

I was honored several times this year:

  • one of the authors of Professional SQL Server 2005 Integration Services (Wrox)
  • allowed to participate on the leadership team for the Code Camps
  • honored to lead the Richmond SQL Server Users Group
  • honored to lead the Richmond .Net Users Group
  • nominated for MVP
  • honored to deliver the Team Edition for Database Professionals keynote at the Philadelphia Launch Event
  • honored to be invited to Redmond several times to participate in TAP and certification discussions
  • honored to work with a fantastic team to develop an industry-changing application (which I cannot talk about!)
  • honored to be asked to join Solid Quality Learning as a mentor

I don't do resolutions, I merely set goals for the forseeable future. I was able to accomplish two of three goals I set at the end of last year. I find three is a nice round number for goals - and I am working on my three goals for 2007 this last afternoon of 2006.

Here's to 2007 - may you have a safe, prosperous, and happy new year!

:{> Andy

Technorati Tags: 2006 Year in Review trust Solid Quality Learning integrity new baby 2007

VarDecimal in SP2 (December CTP)

I've been experimenting with the new VarDecimal data type in SP2.

In a virtual PC named vpcPeter (there's a vpcRay and vpcEgon nearby), I deployed the December CTP of SP2. I then created a database named StorageTests and a table inside named dbo.VarDecimalTest.

I wrote a routine that populated a decimal field in dbo.VarDecimalTest with 10,000 rows of decimal(18,5) data type.

I next enabled the vardecimal datatype for the database using exec sp_db_vardecimal_storage_format 'StorageTests', 'on' and executed the test sproc (exec sys.sp_estimated_rowsize_reduction_for_vardecimal 'dbo.VarDecimalTest') to estimate row_len savings:

29.47 / 32.87 ~= 0.8966 equating to a roughly 10% reduction in data table size.

I then enabled the varDecimal data type on the table with the following command: sp_tableoption 'dbo.VarDecimalTest', 'vardecimal storage format', 1. Note that this does not add a new data type per se (executing select * from sys.types still returns only 27 rows...) but it converts existing decimal / numeric rows in the specified table to the new data type - saving space:

Before:


After:

The script I used to generate these results is available here.

My original table is 352 KB, my VarDecimal table table is 312 KB. 352 * .8966 = 315. Pretty darn close.

:{> Andy

Technorati Tags: SQL Server VarDecimal 2005 SP2 December CTP

SQL Server 2005 SP2 December CTP released

The SQL Server 2005 team has released SP2 (December 2006).

Some cool fixes are in this release including:

  • A new datatype for the Enterprise Edition database engine: vardecimal. Similar to varchar, this datatype stores only the precision required by the value. There's even a stored procedure included to estimate the reduction in average row size. Cool!
  • Maintenance Plans can now be executed without installing SSIS. Although Maintenance plans remain SSIS packages, selecting the Database Engine option during installation includes the Integration Services execution engine.
  • Logon Triggers!
  • The ability to return text XML query plans when the XML contains more than 127 nested levels.

Some nice touches for SSIS include:

  • The BypassPrepare property of the Execute SQL Task now defaults to True. (Thank you)
  • A new property - ParameterSize - for string parameters in the Execute SQL Task.
  • More variable comboboxes - less variable textboxes.

There are enhancements and improvements to other SQL Server components including:

  • Scripting
  • Management Studio Reports
  • Database Mail
  • The Copy Database Wizard
  • Backup and Restore
...just to name a few!

:{> Andy

Technorati Tags: SQL Server 2005 SP2 December CTP

Team Edition for Database Professionals Launch Events!

The Philadelphia Launch Event for Team Edition for Database Professionals was a blast!

The crowd was awesome and very engaged. They added insight, made great suggestions, and asked some good questions - it was obvious most folks are excited about the product. From my informal poll, others present are taking a wait-and-see stance.

I hear both groups! I'm excited about the options and support the product enables for database developers, but I also understand the cautious response from most operational (system) DBAs.

I need to write more about this (when I have more time to blog!), but the same traits that make the operational DBA very good at their job also make them very resistant to change. I am working on ways to implement the cool new features of Team Edition for Database Professionals into the daily life of the operational DBA without upsetting the apple cart. To this end, I'm working with some of the smartest operational DBA types on the planet.

I don't believe adoption will be an issue on the developer side of the house. And, even if the product is not adopted into the operational DBA toolkit, it will still make their lives easier beacuse database developers and developers developing database object (yes, there is a difference) will now have integrated testing at their fingertips. Regression testing will become part of the DDLC (Database Development LifeCycle).

More later...


If you're in the mid-Atlantic region and haven't already registered, you can register for the Launch Event in Washington, DC scheduled for Tuesday 5 Dec 2006 at the Grand Hyatt located at 1000 H Street, NW in DC.

:{> Andy

Technorati Tags: Data Dude Team Edition for Database Professionals Launch

I'm a Mentor!



My Solid Quality Learning business cards arrived in the mail yesterday. I like my new title: Mentor.

I believe the title is appropriate for the mission of Solid Quality Learning which is summarized:
Solid Quality Learning is the trusted, global provider of advanced education and solutions for the entire Microsoft database platform.

Cool.

:{> Andy

Technorati Tags: Solid Quality Learning SQL Mentor

The Clean Break

For the first time since 2001, I find myself sitting behind the president's desk in the global headquarters of my own business!

The new venture is called Andy Leonard Technologies, Inc. and this my first full-time day on the new office.

I mostly perform work for Solid Quality Learning as a mentor. For those who are unfamiliar with S. Q. L., it's a fantastic company! Not only are the people industry-recognized experts, they're actually cool! They engineer the entire process of joining their ranks so that it's low-stress. It has allowed me to ramp up quickly - and for that I am very thankful.

Mentoring is a great concept - it's a hybrid between consulting and instructing. Here's how it works: I join teams for a number of days or weeks. While working together, we develop a specific set of objectives - usually to develop template projects, best practices, and establish a foundation for the working environment. Together, we build out example projects using the templates to demonstrate their effectiveness.

In addition to this, I'm also a trainer. When training, I lead excellent classroom-based instruction courses. I currently lead the ETL with SSIS course, but I am ramping up on more course material - hoping to lead others.

In my previous jaunt into business, I operated ASI. ASI specialized in industrial automation and integration. It was a lot of fun for me because it brought together several disciplines I enjoyed (and still enjoy!): engineering, electrical control systems design, and software development.

ASI started in 1995 when I wrote one of the first completely web-based Manufacturing Execution Systems (MES) called Plant-Wide Webs. Plant-Wide Webs started using dynamic HTML before DHTML was widely available, then graduated to ASP. Writing the application and running the business were cool experiences!

I learned a lot about business and myself. :)

Most of those lessons were learned the hard way. I remember looking at the checking account one day during my first few months of entrepreneurship and seeing $80 in there. I thought "I must've done something stupid." I was right, and this was the beginning of my understanding of business development.

When Solid Quality Learning called I was ready. I understood the risks of making the leap. I knew it would be a lot of hard work. But, unlike last time, this time I have a fantastic team supporting me - and outstanding business development support!

The person who deserves the most credit has to be Christy. Not only does she support this decision, she's actively involved - booking my flights, making hotel arrangements, and renting cars... she's awesome! She even jumps onto mapping software and talks me in from the airport to the hotel so I don't drive around lost my first night in a new town! (The car rental people always ask "Do you know where you're going?" and look at me funny when I say "No, but I'll find it!") Christy does this in addition to taking care of Stevie Ray and Emma without help from me (when I'm out of town or holed up in the office) - and she does it without complaining.

Thanks, Cutie. I couldn't do this without you!

It feels good to be back. So far, the new boss is treating me ok... but it's still early on the first day... ;)

:{> Andy

Technorati Tags: Andy Leonard Technologies, Inc. Self-employment SQL Server Solid Quality Learning SQL

Study: SQL Server is Safest Database

According to this report, SQL Server is the safest database engine on the market.

Security Vulnerability Count

  • Oracle: 70
  • MySQL: 59
  • Sybase: 7