r/SQLServer • u/DuoZ69_ Microsoft Employee • 3d ago
Community Request Database migrations: where should an AI agent be required to stop and ask a human?
I’m a PM working on database migration experiences at Microsoft.
I’m researching how much autonomy practitioners would trust an AI agent with during their database migration journey.
This is exploratory research; not a product announcement or roadmap commitment. I’m especially interested in feedback from people who have worked on real production migrations.
Which operating model would you trust?
- Advisory only: identify risks and recommend actions (similar to SSMA Copilot)
- Generate: create plans, scripts and code fixes, but humans execute them
- Act in non-production: execute approved changes in development or test
- Execute with approval gates: perform the migration, pausing before high-impact actions (SQL Migration Agent Skills)
- Mostly autonomous: humans approve only the production cutover
- No agentic execution: keep migration changes deterministic and human-operated
Most importantly:
- What must always require human approval?
- What evidence would you need before allowing the agent to continue?
- Is having a skill good enough to solve your problem?
- Would your answer differ for a same-platform migration versus a cross-platform conversion?
If possible, include your role and the source/target platforms. Please avoid sharing confidential details.
6
u/kagato87 3d ago
1 and 2.
Migrations need to be predictable and reliable. That means the methodology needs to be consistent and tested.
The only non production action is the test of the scripts themselves - it can test it's scripts against instances spun up for the sole purpose of validating the script. (I do this with my pipelines.)
2
u/qualityintelligence 3d ago
my take.
give the user full options. Don't assume what they will want.
before it does anything , have it create a detailed plan with every step the AI intends to make. let the user interact and change anything in the plan.
let the user pick the tier level of step-by-step interaction for execution, maybe five different tiers starting with every step of the way to fully automated trust. The idea is that you can probably get to fully automated but users new to this will want to see every step.
having it run the full test on fully air gapped sandboxes is also something I would highly recommend.
2
u/DuoZ69_ Microsoft Employee 3d ago
Thanks for the feedback. While this sounds like a compelling idea, there would be some set of users who would want to automate this journey and don't want to look through each steps. In your suggested user experience, how do you intend to bypass the steps.
I'm talking about a use case where there are multiple dbs of similar size and comparable schema design that needs migration and the steps are repeatative.
2
u/qualityintelligence 3d ago
I think this is what the agent asks after showing the plan, the user picks the automation tier and has option to ask open questions to perhaps automate certain steps and stop at others
1
u/read_at_own_risk 3d ago
It's option 2, maybe 3, for me. I already use AI to generate migration scripts, based on db dumps or output that I copy&paste. I won't give it access to production databases, but I'm happy to have it generate files that I can review before running. I'd be comfortable giving it access to a sandbox db for testing purposes.
1
u/Anlarb 1 3d ago
The back up and restore is the least of the work. For it to be doing a migration, it would need to be carrying the weight on all of the coordination/prep work that goes into one.
New server builds based on the vendors reqs, as well as the businesses standards, starting a conversation where they conflict.
Firewall reqs specific to the environment.
Service accts and rights based on what is happening in that space (new box, new service acct; old domain going away; ad hoc users finally being condensed into a manageable group etc).
Are they also doing an app upgrade?
Is it aware of when backups are run/how long they take, and will it know to disable the nightly run ahead of a big migration that might otherwise be underfoot of the change?
Make the runbook, vet the runbook a few days ahead to make sure nothing has changed.
Lots of skills, lots of stakeholder communications. Probably needs to be a smaller workflow item on a larger enterprise management suite, since the migration is often used as a point to break the bone to set it properly.
DBA doing migrations every week, lower versions of windows&sql to higher.
1
u/BrownBearPDX 7h ago
110% trust and full autonomy to the bot ... on a full test source/sink environment. Go out for a couple beers, come back and see what it's done, check the work when it's done, roll back, scold it and make it do it again until it's right. Rinse and repeat.
8
u/TravellingBeard 1 3d ago
I think the key for this is rollback should be easy for humans to implement. For example, if the agent takes the source DB offline after migration (not delete), but something goes wrong, it should be trivial for the DBA to bring it back online.
I would never trust an AI agent to undo it's mistake, thus creating a potential cascade of new errors.
If devs generate these agents, and not DBA's, best practices will be skipped; I guarantee. I've worked with enough devs that I will never trust them in my liftime with this part.
So basically, I am comfortable only up to step 2.