Thursday, April 23, 2009

Are we there yet?

When I was growing up, while on trips with the family, we'd always ask my dad if we were there yet. For some reason, we needed to know how much longer we'd be in the vehicle. My dad's answer was always the same. A half hour. This seemed to satisfy us for a while. When we repeated the request, the answer was the same, regardless of the actual time.

Obviously we stopped believing the answer with time. But that didn't prevent us from asking and more importantly, from wanting to know. My own children ask similar questions. My son likes to know what we are doing, or watching, and so on. We humans like to know that things have a finite length of existence. We like to plan things. Start them. Know when they will end or when they will be over.

Recall when you would copy a file in older versions of Windows, the flying file icon and the guessed completion time. It aggravated me to find out that this was just a guess, and was often wrong. Why couldn't it tell me the correct duration? Why couldn't I be privy to this knowledge. It would help me to plan what I would do next, based on how long this action could take.

Where am I going with this? The other day at work, we were performing some tasks. We kicked off the task. As soon as it was running, we wanted to know how long it would take to complete. Sometimes we can lean on scripts and processes that we have previously written. When we do not have canned scripts or tools ready, we often panic. We will try to invent something on the spot. In a few occasions I have asked the twitterverse for assistance, and received help there. Other coworkers have provided help as well. But each time, I wanted to know much sooner than I was able too, when it would be done. What I should have done was taken the time before hand, to create the needed script or tool or means to determine progress, prior to kicking off the process. This is not always an option. Its a good idea though.

Once the process has completed, I want so desperately to spend time writing these scripts or tools. If I can, I will, and save them for the next time. Keeping these tools handy will better allow me to answer these questions next time. Take the time now to better prepare these tools. Do it when your head is clear, and you can write them without the pressure of a running process. Share them with others, coworkers and the SQL community.

backups, native and 3rd party
bcp or bulk insert processes
dts/ssis packages and its steps
reindexing scripts
attaching/restoring database

These are the ones that appear on the tip of my tongue. You will have others that ring a bell for you. Identify them now. Come up with the tools to answer that burning question, 'Are we there yet?'

No comments: