Database packages and multiple databases
joteke
Posts: 5
Hi
how does database packages work when we have multiple customer databases in single installation which need to be updated?
Does it require creating one package per target database, or is there a chance to specify multiple databases as target for a single DB package and does it (update) happen in a transaction?
We have one web application with multiple customer databases, and we need to ensure they either update in one go, or then not (rolled back in case something goes wrong)
how does database packages work when we have multiple customer databases in single installation which need to be updated?
Does it require creating one package per target database, or is there a chance to specify multiple databases as target for a single DB package and does it (update) happen in a transaction?
We have one web application with multiple customer databases, and we need to ensure they either update in one go, or then not (rolled back in case something goes wrong)
Comments
At the moment, the easiest thing to do is to have a package for each of the databases that you want to deploy. You can release them together when more than one has changed, but as you mentioned it's not transactional across databases.
It's a useful bit of feedback, and we'll add it to the board. How do you currently run the upgrades? Do you put the upgrade scripts for each database into one script with a begin/end transaction around it?
Thanks,
Justin
Developer
Redgate Software Ltd
we are just to start to evaluate DM and these were just initial questions.
Capability to specify multiple target databases for update as a list in same package would be VERY important feature (for us), we need to ensure that after the installation is done all the dbs are in same state (since web app expects it)
Having them in separate packages however does allow the ability to update just a single database, and around an updated packge for just one database. Is this something you would need?
Developer
Redgate Software Ltd
Single package or multiple packages, is nuance (except that a installation can have tens of dbs so copying the db packages probably is a tedious task), point is that we need to ensure the upgrade goes smoothly at the installation level (web site plus all databases). If one DB is left behind for some reason, that leads to availability and such issues, and we are in hurry next morning to fix it to the same level with other customer dbs.
That's why we'd need entire site update which happens transactively from web package and one (or multiple) database package point of view. If one of them fails, whole update should be rolled back.
Developer
Redgate Software Ltd
Presently I'm using SQL Compare to generate a change script, then running it through SQL Multi Script to execute that script against each target database. This is an error-prone process - the MultiScript target lists must be edited by hand prior to each deployment, and if a target database is out of schema alignment there's no "update" resynchronization available.
(BTW: This suggestion has already been registered on the UserVoice site - please vote it up!)
Database Administrator / Software Engineer
Nelnet Business Solutions - FACTS-SIS
Do you typically deploy these databases all at once, or are there different release schedules for different groups?
Developer
Redgate Software Ltd