16
Nov 01 '19
dont cowboy shit in production
6
u/got-trunks Nov 01 '19
delete from * where ....
13
u/mac-0 Nov 01 '19 edited Nov 01 '19
delete from table --where 1=23
u/famousxrobot Nov 01 '19
I once did this because I had a line break between my delete from and where... something was wrong with my where line, but SSMS was like “it’s all good up to this line, so let’s go!”
10
u/Fortinbraz Nov 01 '19
This is a repost bot that copies one of the top 20 posts in a random sub every 10 minutes.
This post is currently #3 and was originally posted by /u/B33rG33k 7 months ago.
5
u/wonder-maker Nov 01 '19
Don't even have to delete it, just fat finger an entry and lock a table and watch the fun begin
4
5
2
u/CutPasteIsSuperior Nov 01 '19
Intellisense, coupled with DROP TABLE IF EXISTS is an absolute nightmare. I hope to god you don't relate with what I am saying.
1
Nov 01 '19
Staging deployment structure and data copy from production.
Humans get read perms.
All production changes occur via version controlled, tested automation scripts.
Profit.
1
1
u/AllReligionsAreTrue Nov 01 '19
That's good for starters, but easy to fix.
Try checking in code that compiles, but has a hard to spot bug, like changing a one to an lower-case L.
37
u/[deleted] Nov 01 '19
One time, in my first real job... you know how sometimes SSMS locks up when you right click? Well, I had right clicked and then left clicked at the same time. When things unfroze it unfolded that I had dropped a database.
The DBAs were furious with me and called a meeting with my direct manager, and their manager (a VP) to try to revoke my access. They started the meeting by talking about a variety of things, all of which made me look horrible, and then I calmly asked them why I had the ability to drop the database in the first place, and why they were so incompetent. Two questions, then silence.
The VP looked at me, looked at them, and said, "So why did he have access to drop the database like that?"
End of meeting.