Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-05-04 : 07:38:58
|
| Izzy writes "We have developed a SQL server based .Net application. On the server side there is a service running that checks if there are any new updates for the database and if so it downloads and executes the sql scripts to update the database schema and contents. the question is how to prevent other clients from accessing the database while it is in update and how to make the clients aware of such update so they will look to update themselves. We had two options which we don't like both:1. use different user for clients and updater appllication and throw all other connections to the database from the updater and then immediately change the username that the application is using so next time the application gets a logon failed message and it knows to look for update. 2. every time the application is trying to connect the db to check a flag is the server is in update and if the version is still the known version (The problem with this solution is the overhead to each connection)Can you help guys?Thank a lot,Izzy" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-04 : 07:47:09
|
| You don't like either method because they're trying to implement a feature that is fundamentally flawed. Schema updates in a deployed app should be done 1) very, very rarely and 2) only through a deliberate process that is initiated manually, during maintenance windows, and 3) as part of a regular version release and/or patch schedule, at the client's option. It should NOT be force fed to them without their approval or control.Applications that take total control over databases do neither one a good service. I'd suggest that the app be configured to notify the user of new patches/versions, but not do anything to try to run them automatically. You may need to change your release cycle so that it does not require frequent updates, and instead releases larger/more changes less frequent updates. |
 |
|
|
|
|
|