When I've served in the army a not-so-funny story happened to one of my friends:
He played with his M16 because he was bored (It was the year 2000. no smartphones...). And in some weird way he ended up having his gun loaded without him knowing it.
So how do I know it?
Because an officer checked his gun... (lucky for us all).
When working with SQL SERVER a friend of mine (it's always friends. never me...) worked on his local copy of the database.
Or that's what he thought he was doing.
Actually he had two tabs opened inside SSMS:
One representing his local enviroment.
One representing our production.
Can you guess what happened?
You are probably right:
The production database was deleted.
Well let's just FF 3 hours later when all the managers came back from home because nothing worked. And although it was on SQL AZURE which has great backup, he somehow managed to do all the steps which avoids the normal way of restoring to point in time.
We were so helpless that we tried to restore the data from the cache into the DB!
Finally the guys from Azure came to our help and gave us what we needed.
What did I learn from this?
Seems like less then I thought.
Because yesterday it almost happened to me again!
It's so easy to get into these places.
The only way is DISCIPLINE.No fancy tool will save you if you don't use it.
You set rules, and you understand deeply why they exist (In some proffessions they say: "Regulations are written in blood").
Try not to hold a loaded rifle, and if you must hold it- at least be aware of it.