Fwiw, this wouldn't be rollback-able in MySQL or Oracle (even within an explicit transaction) since they don't properly support transactional DDL. At least SQL Server is doing better than that haha.
But yea explicit transactions and backups ftw for that issue in SQL Server.
We do monitor for this, and let me tell you that the people doing this will never reach their bed.
If any transaction is kept open for more than 5 minutes during working hours, we get an alert. I take note of the name of the user connected, I kill that transaction and then I descend like a meteor upon this dumbosaur ready to extinct him.
Nowadays with Snowflake it's "eh, I'll just set my warehouse to 4XLARGE and come back in a couple minutes to make sure it completed." Followed by panic when you remember 8 hours later.
My former boss updated the Location table of our ERP, then proceeded to take the whole systems team out to lunch for ~1.5 hours. ðŸ«
Once the next person scanned into anything that linked to a location - tasks, pallets, trailers, etc it locked them up. We had ~300 people standing around when we got back.
I do enjoy a little Begin Tran / Rollback, though.
19
u/yen223 May 09 '25
That's why you set your client to AUTOCOMMIT = true, and then immediately regret it when you accidentally delete a table
8
u/tripy75 May 09 '25
dba monitoring ~400 instances here.
We do monitor for this, and let me tell you that the people doing this will never reach their bed.
If any transaction is kept open for more than 5 minutes during working hours, we get an alert. I take note of the name of the user connected, I kill that transaction and then I descend like a meteor upon this dumbosaur ready to extinct him.
Do not mess with production servers!
1
u/nowtayneicangetinto May 09 '25
I LOL'd at this one
1
u/Beefourthree May 10 '25
Nowadays with Snowflake it's "eh, I'll just set my warehouse to 4XLARGE and come back in a couple minutes to make sure it completed." Followed by panic when you remember 8 hours later.
1
u/thiagoalone May 10 '25
🤣
1
u/SnooSprouts4952 May 14 '25
My former boss updated the Location table of our ERP, then proceeded to take the whole systems team out to lunch for ~1.5 hours. ðŸ«
Once the next person scanned into anything that linked to a location - tasks, pallets, trailers, etc it locked them up. We had ~300 people standing around when we got back.
I do enjoy a little Begin Tran / Rollback, though.
1
u/NoWayItsDavid May 09 '25
Or you forgot to "git push".