I once made the mistake of thinking bubblenut knew how to update a database. I was clearly wrong 😃
Luckily, at work, I have a very solid test enviroment in which to test all new scripts, procedures, etc, and I've had the pleasure of doing some really stupid things there, like the updating of everything to the wrong value, quickly rolled back.
It may be hard to believe, but I'm one of the few that can learn from the mistakes of others, so I don't cause many detrimental mistakes myself. I'll share one of my co-worker's with you for the sake of learning.
We have a 400+ thousand sqare foot warehouse, which we run a warehouse management system. A friend of mine, we'll call him "Mike", was working as a System Analyst at the time. I was working along side him, learning the ropes. One of our duties includes "system support", on a pretty wide scale. In this particular instance, we had a blocking lock in Oracle, which prevents users from accessing the blocked table until the lock is cleared. This is a major problem, considering a lock for five minutes could cost us a million dollars. So we take this as a very high priority, and begin grepping through message logs to find the user. Ah ha! Found them! The fix for this is to kill off the user's process, which in turn releases the lock. So Mike does the usual "ps -aef|grep user", and up comes the process. Now, anyone familiar with Unix knows there are two process id's. The one on the left is the child pid, and the one on the right is the parent pid. Well, guess which one he killed? Killing the parent pid knocked the whole system offline, turning our situation from bad to horrible. Our boss comes running to to the room "What the hell just happened!?!?", as Mike is scrambling to contact our Unix admin so he can restart the daemon. A couple minutes later, all is restored, and everyone is calm. This was two years ago, and to this day, Mike still catches hell for it.
Moral: Always the left pid. Always!!!!
😃