Verbose log file should show what was executed. On Fri, Feb 11, 2011 at 2:04 PM, kim <contactme...@gmail.com> wrote:
> > I want to drop the database installed by my msi on uninstall. It does drops > the Db on roll-back but not on uninstall. Following is the code from my > config file. Since setting DropOnUninstall=yes did not worked, so I added > other sql string to execute Drop database command. I am not receiving any > error on uninstall and verbose log has no errors. It appears to me that the > script is not executed? > > can someone suggest whats going wrong here? Thanks! > > <Component Id="CreateSolutionDB" DiskId="1" > Guid="{A4957B82-2F6D-44B7-8AD2-44124F69239C}" KeyPath="yes"> > <sql:SqlDatabase Id="dbSolution" Server="[SQLSERVERNAME]\[INSTANCENAME]" > Database="[SOLUTIONDATABASENAME]" > CreateOnInstall="yes" ConfirmOverwrite="yes" DropOnReinstall="no" > DropOnUninstall="no"> > > <sql:SqlScript Id="CreateTablesSqlScriptWindows" ContinueOnError="yes" > ExecuteOnInstall="yes" ExecuteOnReinstall="no" Sequence="1" > BinaryKey="CreateSolutionDBBin" /> > > <sql:SqlString Id="AddWebcoreLogin" ContinueOnError="no" > ExecuteOnInstall="yes" Sequence="2" > SQL="IF NOT EXISTS(SELECT name FROM sys.server_principals WHERE name = > '[SOLUTIONUSERNAME]') > BEGIN > CREATE LOGIN [SOLUTIONUSERNAME] WITH PASSWORD='[SOLUTIONUSERPASSWORD]'; > CREATE USER [SOLUTIONUSERNAME] FOR LOGIN [SOLUTIONUSERNAME]; > END;"/> > > <sql:SqlString Id="AddRoleToWebcoreUser" ContinueOnError="no" > ExecuteOnInstall="yes" Sequence="3" SQL="EXEC sp_addrolemember > 'db_owner','[SOLUTIONUSERNAME]'"/> > > <sql:SqlString Id="DropSolutionDB" ContinueOnError="no" > ExecuteOnUninstall="yes" Sequence="2" > SQL="IF EXISTS (SELECT name FROM sys.databases WHERE name = > '[SOLUTIONDATABASENAME]') > BEGIN > ALTER DATABASE [SOLUTIONDATABASENAME] > SET SINGLE_USER WITH ROLLBACK IMMEDIATE; > USE MASTER; > DROP DATABASE [SOLUTIONDATABASENAME]; > END" > /> > > <sql:SqlString Id="DropWebcoreLogin" ContinueOnError="no" > ExecuteOnUninstall="yes" Sequence="3" > SQL="IF EXISTS(SELECT name FROM sys.server_principals WHERE name = > '[SOLUTIONUSERNAME]') > BEGIN > DROP LOGIN [SOLUTIONUSERNAME]; > END"/> > </sql:SqlDatabase> > </Component> > > > -- > View this message in context: > http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Drop-database-on-Uninstall-not-working-tp6017327p6017327.html > Sent from the wix-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- virtually, Rob Mensching - http://RobMensching.com LLC ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users