Hi Michael,

Thanks for your reply:

I do have DATABASENAME and SQLSERVER at the time of uninstall.  The
InstallationSqlUser is set by the following User node in my wix source:

<util:User Id="InstallationSqlUser" Name="[SQLLOGIN]"
Password="[SQLLOGINPASSWORD]"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"; />

SQLLOGIN and SQLLOGINPASSWORD are also both available during uninstall.

I don't know how to tell if InstallationSqlUser is being correctly
initialized during the uninstall...any thoughts?


Amy

-----Original Message-----
From: Michael Osmond [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 07, 2008 4:19 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] really stuck on database uninstall

Hi

A couple of thoughts

1. How are you resolving [DATABASENAME] and [SQLSERVER] - are they
correct during uninstall
2. I noticed you are using User="InstallationSqlUser" - has this been
effected by the 2008 upgrade
3. I am not particularly familiar with 2008, but in doing the upgrade
has the SQL instance name where your database is located changed, so the
installer is looking in the wrong place.

Michael

-----Original Message-----
From: Amy Rosewater [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 8 October 2008 6:39 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] really stuck on database uninstall

I have been researching what could have changed.  I think one
significant thing I know has changed is that I upgraded my server's
version of SQL Server to be 2008 (from 2005).

Amy

-----Original Message-----
From: Amy Rosewater [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2008 1:05 PM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] really stuck on database uninstall

Hi All,

 

I have posted this once before and so far no response, so I am going to
try and do a better job describing my problem.  I am using the latest
weekly release Wix v3.0.4513 available since Sept. 13.

 

I have an install that creates a database using the SqlDatabase element.
I have the DropOnUninstall flag set to "yes" for this SqlDatabase.
Additionally, I have several SqlScript and SqlString elements both below
this SqlDatabase and in components which reference this SqlDatabase.
Two of these SqlString elements are set to ExecuteOnUninstall="yes".

 

Until very recently, my SqlDatabase on uninstall correctly located the
SqlString elements that needed to be executed on uninstall (in the
SqlString table these elements have an Attributes value of "2"),
executed them, and correctly called DropDatabase.  Now, however, I
cannot get my uninstall to execute my SqlString elements or drop my
database.

 

I have been trying to figure out what if anything has changed between
when my install was able to successfully execute the uninstall
SqlStrings and successfully drop the database and now.  I can't find
anything that seems relevant.  There are more items in the SqlScript and
SqlString tables now than there were the last time my uninstall was able
to find the ExecuteOnUninstall strings.   Other than that, I really
can't see any relevant differences.

 

Can anyone point me in the right direction of what I should be looking
for?

 

<Component Id="CreateDatabaseSqlAuth"
Guid="66B197B5-42D0-462F-A97E-760D984C38FC">

<sql:SqlDatabase Id="IVDatabase" Server="[SQLSERVER]"
Database="[DATABASENAME]" User="InstallationSqlUser"
CreateOnInstall="yes" DropOnUninstall="yes">

              <sql:SqlFileSpec Id="IVDatabaseFile"
Filename="[DataDirectory][DATABASENAME][DATABASEFILEEXT]"
Name="[DATABASENAME]" />

              <sql:SqlLogFileSpec Id="IVDatabaseLogFile"
Filename="[DataDirectory][DATABASENAME][DATABASELOGFILENAMEEXT][DATABASE
LOGFILEEXT]" Name="[DATABASENAME][DATABASELOGFILENAMEEXT]" />

              <!--ON INSTALL-->

              <sql:SqlString Id="UseNewDatabase"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="USE
[DATABASENAME]" Sequence="002" />

              <!--Create database from scripts-->

              <sql:SqlScript Id="CreateDefaults"
User="InstallationSqlUser" ExecuteOnInstall="yes"
BinaryKey="iV50Defaults.sql" Sequence="003" />

              <sql:SqlScript Id="CreateRules" User="InstallationSqlUser"
ExecuteOnInstall="yes" BinaryKey="iV50Rules.sql" Sequence="004" />

              <sql:SqlScript Id="CreateUserDefinedTypes"
User="InstallationSqlUser" ExecuteOnInstall="yes"
BinaryKey="iV50UserDefinedDataTypes.sql" Sequence="005" />

              <sql:SqlScript Id="CreateTables"
User="InstallationSqlUser" ExecuteOnInstall="yes"
BinaryKey="iV50Tables.sql" Sequence="006" />

              <sql:SqlScript Id="CreateForeignKeys"
User="InstallationSqlUser" ExecuteOnInstall="yes"
BinaryKey="iV50ForeignKeys.sql" Sequence="007" />

              <sql:SqlScript Id="CreateUserDefinedFunctions"
User="InstallationSqlUser" ExecuteOnInstall="yes"
BinaryKey="iV50UserDefinedFunctions.sql" Sequence="008" />

              <sql:SqlScript Id="CreateViews" User="InstallationSqlUser"
ExecuteOnInstall="yes" BinaryKey="iV50Views.sql" Sequence="009" />

              <!--Create Logins-->

              <sql:SqlString Id="DropLoginIfExists"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="if exists (select
* from sys.syslogins where name='[SQLAPPLICATIONLOGIN]') DROP LOGIN
[SQLAPPLICATIONLOGIN]" Sequence="010" />

              <sql:SqlString Id="CreateIVApplicationLogin"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="CREATE LOGIN
[SQLAPPLICATIONLOGIN] WITH PASSWORD = '[SQLAPPLICATIONPASSWORD]',
DEFAULT_DATABASE = [DATABASENAME]" Sequence="011" />

              <!--Create Users and Assign to Roles in the database-->

              <sql:SqlString Id="DropUserIfExists"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="if exists (select
* from sys.sysusers where name='[SQLAPPLICATIONLOGIN]') DROP USER
[SQLAPPLICATIONLOGIN]" Sequence="012" />

              <sql:SqlString Id="CreateIVApplicationUser"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="CREATE USER
[SQLAPPLICATIONLOGIN] FOR LOGIN [SQLAPPLICATIONLOGIN]" Sequence="013" />

              <sql:SqlString Id="AssignIVApplicationUserToRole"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="sp_addrolemember
'db_owner', '[SQLAPPLICATIONLOGIN]'" Sequence="014" />

              <!--On Uninstall Only-->

              <sql:SqlString Id="DisconnectUsersFromDatabase"
User="InstallationSqlUser" ExecuteOnUninstall="yes"
ExecuteOnInstall="no" SQL="ALTER DATABASE [DATABASENAME] SET SINGLE_USER
with ROLLBACK IMMEDIATE" Sequence="901"/>

              <sql:SqlString Id="DropLoginIfExistsIninstall"
User="InstallationSqlUser" ExecuteOnUninstall="yes"
ExecuteOnInstall="no" SQL="if exists (select * from sys.syslogins where
name='[APPLICATIONUSER]') DROP LOGIN [APPLICATIONUSER]" Sequence="902"
/>

       </sql:SqlDatabase>

</Component>

 

<Component Id="PreDataInsertSqlAuth"
Guid="853eb4af-13c6-460c-bbdf-1d559820180c">

<!--Disable all constraints and triggers so we can insert data-->

<sql:SqlString Id="DropAllDataSA" SqlDb="IVDatabase"
User="InstallationSqlUser" ExecuteOnInstall="no"
ExecuteOnReinstall="yes" ExecuteOnUninstall="no" SQL="sp_msforeachtable
'delete from ?'" Sequence="051" />

<sql:SqlString Id="DisableContraintsSA" SqlDb="IVDatabase"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="sp_msforeachtable
'ALTER TABLE ? NOCHECK CONSTRAINT all'" Sequence="052" />

<sql:SqlString Id="DisableTriggersSA" SqlDb="IVDatabase"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="sp_msforeachtable
'ALTER TABLE ? DISABLE TRIGGER  all'" Sequence="053" />

</Component>

 

<Component Id="CreateSampleDataSqlAuth"
Guid="d0556330-ea37-11dc-95ff-0800200c9a66">

       (insert scripts for each table in database that has sample data
here as SqlScript elements...sequence numbering starts at 101)

</Component>

 

<Component Id="CreateVAdminSqlAuth"
Guid="99ee4de9-fc43-42ad-ba8d-1a0a3c210275">

<!--Create VAdmin in USysUser-->

<sql:SqlString Id="CreateVAdminSA" SqlDb="IVDatabase"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="insert into
USysUser (UserGUID, UserName, Password, CanSeeMeFlag,
AccountLockoutFlag, RowVersion, DomainIdentity) values
('B8406884-10CD-48D2-9E2D-3268DC03E104', '[VADMINUSERNAME]',
'[VADMINPASSWORD]', 0, 0, 1, '[VADMINDOMAINIDENTITY]')" Sequence="54"/>

<sql:SqlString Id="AssignVAdminToAdminRoleSA" SqlDb="IVDatabase"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="insert into
USysUserRole (UserGUID, RoleGUID, RowVersion, UserRoleGUID) select
'B8406884-10CD-48D2-9E2D-3268DC03E104', USysRole.RoleGUID, 1, newid()
from USysRole where RoleName in ('Admins', 'SuperAdmin')" Sequence="799"
/>

</Component>

 

<Component Id="PostDataInsertSqlAuth"
Guid="0ed7be03-ea3e-4696-b540-40d623e92cb5">

<!--Enable all constraints and triggers-->

<sql:SqlString Id="EnableContraintsSA" SqlDb="IVDatabase"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="sp_msforeachtable
'ALTER TABLE ? CHECK CONSTRAINT all'" Sequence="801" />

<sql:SqlString Id="EnableTriggersSA" SqlDb="IVDatabase"
User="InstallationSqlUser" ExecuteOnInstall="yes" SQL="sp_msforeachtable
'ALTER TABLE ? ENABLE TRIGGER  all'" Sequence="802" />

<!--Put the LicenseKey entered by the user into the database-->

<sql:SqlString Id="UpdateUSysInstallationWithLicenseKeySA"
SqlDb="IVDatabase" User="InstallationSqlUser" ExecuteOnInstall="yes"
ContinueOnError="yes"
SQL="[UPDATEUSYSINSTALLATIONSQL1][LICENSEKEY][UPDATEUSYSINSTALLATIONSQL2
]" Sequence="803" />

<sql:SqlString Id="UpdateUSysEmailProfileWithSmtpSetupSA"
SqlDb="IVDatabase" User="InstallationSqlUser" ExecuteOnInstall="yes"
ContinueOnError="yes"
SQL="[UPDATEUSYSEMAILPROFILESQL1][SMTPSERVER][UPDATEUSYSEMAILPROFILESQL2
][SMTPSERVERUSER][UPDATEUSYSEMAILPROFILESQL3][SMTPSERVERPASSWORD][UPDATE
USYSEMAILPROFILESQL4]" Sequence="804" />

<!--Update Global Constants related to Analysis Services-->

<sql:SqlString Id="UpdateAnalysisServerGlobalConstant"
SqlDb="IVDatabase" User="InstallationSqlUser" ExecuteOnInstall="yes"
ContinueOnError="yes"
SQL="[UPDATEANALYISSERVERSQL1][ANALYSISSERVER][UPDATEANALYISSERVERSQL2]"
Sequence="805"/>

<sql:SqlString Id="UpdateAnalysisDatabaseGlobalConstant"
SqlDb="IVDatabase" User="InstallationSqlUser" ExecuteOnInstall="yes"
ContinueOnError="yes"
SQL="[UPDATEANALYISDATABASESQL1][ANALYSISSERVERDATABASENAME][UPDATEANALY
ISDATABASESQL2]" Sequence="806"/>

</Component>

 

Thanks in Advance,

 

Amy

 

Amy Rosewater

SPECTRUM Human Resource Systems Corporation

707 17th Street Suite 3800

Denver CO, 80202

303.592.3403

[EMAIL PROTECTED]

 

------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge Build the coolest Linux based applications with Moblin SDK &
win great prizes Grand prize is a trip for two to an Open Source event
anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge Build the coolest Linux based applications with Moblin SDK &
win great prizes Grand prize is a trip for two to an Open Source event
anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to