Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading SQL Instance through ClickOnce

I have a Winforms application that was deployed through ClickOnce that has a prerequisite of SQL Server 2005 Express. I would like to change that to SQL Server 2008 R2 Express.

I was looking at the package.xml for SQL Server 2008 R2 Express and noticed the lines:

<!-- Defines an upgrade installation (x86) -->
-<Command Arguments="/q /hideconsole /action=Upgrade /instancename=SQLEXPRESS 
                     /IAcceptSqlServerLicenseTerms /skiprules=RebootRequiredCheck" 
          PackageFile="SQLEXPR32_x86_ENU.EXE" 
          EstimatedInstallSeconds="420" EstimatedInstalledBytes="225000000">

This SEEMS to imply that an upgrade is possible. However, when trying this out it failed with a prompt telling me to uninstall the existing SQLEXPRESS instance.

Does anyone know if this is possible? Am I, perhaps, doing something wrong? Do I simply need to go the extra 'mile' and code an uninstall of the existing SQL instance? Has anyone ever dealt with something similar?

P.S. Does this belong on Database Administrators (https://dba.stackexchange.com/)? I wasn't sure given the ClickOnce context of my question.

like image 813
Refracted Paladin Avatar asked Nov 14 '22 05:11

Refracted Paladin


1 Answers

I had to do the same a while ago. What I did was to do exactly as you describe and code the uninstall for SQLExpress.

But I did it in a startup module of the app, I checked for the installed version, run its uninstall, then checked again (in case the user cancelled), then restarted the app.

Clickonce sees the missing required prequisite and offed to install..

Very long winded, but did work.

I've since changed to use SQL Everywhere (SQL Compact use to be called), Its only a DLL and can therefore be upgraded with the apps own code without this messing.. Our local database is only small (its a cache of data from a webservice). This might not be big enouigh or powerful enough f

like image 79
JohnnyJP Avatar answered Dec 17 '22 03:12

JohnnyJP