Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How often do you have to run adhoc SQL scripts in prod?
1 point by actionowl on April 30, 2020 | hide | past | favorite
At my current company I lead the SRE team, but previously had been a developer and worked on a couple of products, one that ran in production for about 8 years (and is still running, in maintenance-only mode.)

The new development team has decided to write a new system to replace the old one and they frequently ask us to run ad-hoc SQL statements to clean up records and patch up issues caused by bugs.

In my ~8 years of working on the existing app, I can probably count on one hand the number of times we needed to run ad-hoc SQL scripts against production data (almost always after importing data from an other system), everything else was handled with migrations.

I'm seeing about 3-5 ad-hoc scripts needing to be run per-release. Just curious if this is at all normal or if I'm just expecting too much.

If you're wondering why I might have a problem with this at all, it's because at least 50% of the time there is also a problem with the SQL script and it either doesn't do the right thing or it has syntax errors. It feels like it was just "thrown over the wall".



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: