So you cannot change schema in a transaction. So unless your installer only updates data, it's not a useful conversation :)
How do we go about updating the db? We talk to our customers about their deployment and upgrade strategy and train them. It involves a lot more than clicking the installer button. Regarding backup in the installer: the short answer is just don't do it. It's a lot of work for no tangible benefit. It's best performed by the actual database application. I've seen an installer trying to backup the database before proceeding in an immediate CA, after asking the user. Nobody who knew what a "database" was (nobody sane) wanted to use the feature. The only time it had any benefit was for a small desktop-type applications that used an embedded database (Microsoft Access or SQL Lite). Any kind of SQL Server or "remote" backup is a crapshoot where you need to assume, for example, that the database backup has been configured (which remote path are you going to write a backup to?) and that you have permissions to execute a backup (most of the time the databases we deploy with MSI are pre-created and the user doesn't get enough permissions to drop the database or do it's backup). cheers -dB. dB. @ dblock.org Moscow|Geneva|Seattle|New York -----Original Message----- From: lewisv [mailto:le...@nitorco.com] Sent: Friday, May 07, 2010 9:10 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] transactions in db scripts I am wondering about how you guys handle transactions in db upgrade scripts. >From what i have seen sql server, does not allow create/alter/drop functions in transactions unless you have some flags sets. First am i correct with this? Next how do you guys go about updating the db? Should i surround my script with a transaction? I would imagine the transaction will get quite large with db changes etc... Or do i just let the scripts go and assume that they will work. - I am planning on backing up the db before i start the install anyway, so even if it fails we could just overwrite it with the backup ( which would be manual, but at least the db is not in a half upgraded state ) Is there a good clean way to rollback if there is an error with the install? Thanks. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/transactions-in-db-scripts-tp5019222p5019222.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users