this post was submitted on 16 Nov 2023
242 points (97.6% liked)

Very Real Tech Pics

1368 readers
1 users here now

There's no place like 127.0.0.1

founded 2 years ago
MODERATORS
top 20 comments
sorted by: hot top controversial new old
[–] Xtallll@lemmy.blahaj.zone 18 points 2 years ago* (last edited 2 years ago) (1 children)

Sudo rm -f / home/beth/Pictures/SaturdayNight.jpg

[–] hardaysknight@lemmy.world 3 points 2 years ago (2 children)

Why would you even need Sudo, let alone the force flag to delete a file from your home folder

[–] Player2@sopuli.xyz 7 points 2 years ago

To feel powerful

[–] PoolloverNathan@programming.dev 5 points 2 years ago

What if you want to take something from someone else's home?

[–] rhacer@lemmy.world 18 points 2 years ago (1 children)

Thank God for rollback. Surely he didn't have auto-commit on!

[–] DmMacniel@feddit.de 26 points 2 years ago (1 children)

no transaction is in progress

[–] Hupf@feddit.de 15 points 2 years ago
[–] bar1@lemm.ee 15 points 2 years ago (2 children)

A very real problem I ran into in SSMS was I had inadvertently highlighted all parts of the script except the "where" clause and executed it. I thought to myself, "why is this taking so long for such a low impact change?"

I knew running ad-hoc scripts in a production environment was risky, but I accepted it. We had a fresh enough backup already loaded in our sandbox environment and the removed data was quickly restored from there after some cursing and some quick hacking. This happened 6 years ago.

The data that was deleted? All the user accounts of our biggest client. This happened at 10 AM in the morning on a weekday. FML. I was lucky to keep my job.

As an aside, if you do something on my level of stupid, then escalate the issue up the chain of command as quickly as possible. Do not hide it. If you've built up enough good will with your co-workers and bosses, they will rally to your aid. Definitely don't try to hide it. That will almost certainly lead to termination.

Check my war wounds. Every soldier has a story to tell.

[–] finestnothing@lemmy.world 4 points 2 years ago

Always use transactions

[–] reverendsteveii@lemm.ee 3 points 2 years ago (1 children)

10 AM in the morning

good thing it didn't happen at 10 AM at night, I guess

[–] bar1@lemm.ee 3 points 2 years ago

It was right after 9 in the afternoon and my eyes were the size of the moon.

[–] jsprfrst@kbin.social 11 points 2 years ago (1 children)

Good that Jared had followed good backup practise

[–] slazer2au@lemmy.world 10 points 2 years ago (1 children)
[–] jsprfrst@kbin.social 9 points 2 years ago (1 children)

wait a minute?!... be right back

[–] Samsy@lemmy.ml 3 points 2 years ago (1 children)

Not back? Did you make the backup test in production?

[–] Honytawk@lemmy.zip 4 points 2 years ago* (last edited 2 years ago)

cricket noises

[–] reverendsteveii@lemm.ee 4 points 2 years ago

me when I ran the alias that clears all my k8s namespaces, but I was in the prod context rather than my local

[–] GbyBE@discuss.tchncs.de 4 points 2 years ago

Let's say I was once very happy that I remembered learning about a certain Oracle feature called flashback queries one day when I made that mistake.

[–] TheSlad@sh.itjust.works 1 points 2 years ago (1 children)

Where clauses should be syntactically required for delete or update statements. Throw an error without them. If you really want to hit every record in the table then throw a WHERE true in there just to be explicit.

Its such a common mistake i dont get why this isnt a thing.

[–] GBU_28@lemm.ee 1 points 2 years ago

Good idea.

Easy enough to slap a where 1=1; on there if you want to burn the place down