April 18, 2019 at 11:38 am
I was working remote, trying to clear your queue in order to start with a clean slate the following week. Everyone was gone for the day. My last task is to delete 25 rows from a production table but accidentally deleted 25000 rows from the table.DB is log-shipped to another instance, so was able to grab the data and replace it in production. But I am puzzled since than if I should tell anyone about this and or should I keep quite and what should be the reasoning behind my action.
April 18, 2019 at 1:15 pm
Absolutely tell your manager, boss, team lead whatever. You don't need to tell the whole company. However, you don't want to look like you're attempting to hide it. Honesty and clarity are always the best policies. Now, I dropped a table in production once. The phone started ringing while I was fixing it. I fixed it, answered the phone, and told the people on the other end, "Yeah, there was a glitch, but it should be online now, check again." I didn't tell them what I did. However, I went straight to the boss to let her know. Nothing ever happened from it, but my bottom was covered if something did.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 18, 2019 at 1:16 pm
This sounds like an interview question... especially since you've asked so many similar questions.
I'll give you some hints, though...
BEGIN TRANSACTION
ABSOLUTE HONESTY
--Jeff Moden
Change is inevitable... Change for the better is not.
April 18, 2019 at 2:28 pm
Tell your boss or manager or whatever but make sure you have a good understanding of actual impact before you do. That conversation can have a very different tone if it's I deleted a bunch of rows and our international sales website was down for an hour vs I deleted some rows in an internal database and the only people who use it were gone for the day so it's a good thing I did it after hours.
April 18, 2019 at 3:12 pm
Definitely tell your boss. They might know about the ON DELETE CASCADE foreign key constraint....
There may well be other stuff affected that you do not know about. Tell them what you've already done to get the data back. Next time tell them first before you start the recovery actions.
April 18, 2019 at 3:36 pm
Never hide a mistake, that will get you more trouble than the actual mistake. Tell your supervisor or manager. leave it up to them if it should go higher.
April 18, 2019 at 4:09 pm
Heh... and here we are trying to teach someone on an interview to be either a DBA or a Developer how to be ethical. This should be an innate attribute of the interviewee for either of those positions. They should already know the answer.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 24, 2019 at 10:02 pm
For sure, it sucks when stuff like this happens but a good boss will be understanding and happy that you owned up to the mistake and let them know about it.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply