I develop a software system that runs on multiple computers that connect to a centralized database.
At this point in time, all SQL queries are inline with the applications source code. I would like to start migrating these into stored procedures.
If I need to make a change to a stored procedure that will require a software change, how can I synchronize the updates? For example: I change sp_SelectRecordByID
and publish an update for the software. Immediately, all running software versions will receive an error upon running sp_SelectRecordByID
. Once they crash and the update is received, all is good.
How do I prevent this scenario?
I've come up with a few ideas:
Are there more effective methods or am I stuck with these options?
From what I understood this is more of a deployment issue. The way I see it there are couple options.
If you can deploy SQL Server and application changes simultaneously (or at least near to that) then you can just publish both at the same time but I guess it depends on the system.
Can you do this over the weekend when there is no risk of applications crashing?
Do you deploy the new application version to all users at once? If yes then you can just create new SP first, deploy new application version and then delete old SP.
Anyway, hope this helps. If not, please provide more details on number of servers, number of client applications and such…