Hello,
While performing a minor upgrade to my wix setup, I want to reinstall my database, all the existing content should be removed.
I try to do this with these commands:
<component id="user-content-SqlComponent" guid="1234">
<sql:sqldatabase id="user-content-SqlDatabase" database="Foobar" user="SQLUser" server="<span>[SQLSERVER]</span>,<span>[SQLSERVERPORT]</span>" createoninstall="yes" droponuninstall="yes" droponreinstall="yes" createonreinstall="yes">
<sql:sqlscript id="user-content-CreateTable" binarykey="CreateTable" executeoninstall="yes">
</sql:sqlscript></sql:sqldatabase>
</component>
But I get the following error:
Error 6 Cannot set column 'Attributes' with value 128 because it is greater than the maximum allowed value for this column, 127. candle.exe 0 1 WixSetup
Without the DropOnReinstall="yes" attribute everything works fine but the msi log file looks like this and the database content is definitely not removed:
MSI (s) (E0:E4) [15:20:47:052]: Doing action: UninstallSqlData
Action 15:20:47: UninstallSqlData. Configuring SQL Server
Action start 15:20:47: UninstallSqlData.
MSI (s) (E0:E4) [15:20:47:067]: Creating MSIHANDLE (1) of type 790542 for thread 1764
MSI (s) (E0:F4) [15:20:47:067]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI1857.tmp, Entrypoint: UninstallSqlData
MSI (s) (E0:10) [15:20:47:067]: Generating random cookie.
MSI (s) (E0:10) [15:20:47:067]: Created Custom Action Server with PID 6132 (0x17F4).
MSI (s) (E0:98) [15:20:47:114]: Running as a service.
MSI (s) (E0:98) [15:20:47:114]: Hello, I'm your 32bit Impersonated custom action server.
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (2) of type 790541 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (3) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (3) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (4) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (4) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (5) of type 790540 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (6) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (6) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (5) of type 790540 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (7) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (7) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (8) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (8) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (9) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (9) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (10) of type 790540 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (11) of type 790540 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Creating MSIHANDLE (12) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (12) of type 790531 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (10) of type 790540 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (11) of type 790540 for thread 5452
MSI (s) (E0!4C) [15:20:47:130]: Closing MSIHANDLE (2) of type 790541 for thread 5452
MSI (s) (E0:F4) [15:20:47:130]: Closing MSIHANDLE (1) of type 790542 for thread 1764
Action ended 15:20:47: UninstallSqlData. Return value 1.
I'm using candle.exe version 3.0.4318.0
I would really appreciate if you could fix this issue.
link to nabble forum:
http://n2.nabble.com/Problem-with-SqlDatabase-while-upgrading-td719783.html#a724450
Thanks in advance!
Daniel
Logged In: YES
user_id=2181115
Originator: YES
Hi,
I tried my WiX script with the new version 3.0.4415.0
The behaviour is definitely better, but I still have one issue and I guess it might still be a bug, but maybe even on the msi side.
When I use sqldatabase with the DropOnReinstall="yes" attribute and the CreateOnReinstall="no" attribute the database is deleted and not recreated, this seems to be the right behaviour:
<sql:sqldatabase id="user-content-SqlDatabase" database="Foobar" user="SQLUser" server="<span>[SQLSERVER]</span>,<span>[SQLSERVERPORT]</span>" createoninstall="yes" confirmoverwrite="no" droponreinstall="yes" createonreinstall="no" droponuninstall="yes" continueonerror="no">
<sql:sqlscript id="user-content-CreateTable" binarykey="CreateTable" executeoninstall="yes" executeonreinstall="no">
</sql:sqlscript></sql:sqldatabase>
When I use sqldatabase with the DropOnReinstall="no" attribute and the CreateOnReinstall="yes" attribute and delete the database manually, the database is recreated, which seems to be also right:
<sql:sqldatabase id="user-content-SqlDatabase" database="Foobar" user="SQLUser" server="<span>[SQLSERVER]</span>,<span>[SQLSERVERPORT]</span>" createoninstall="yes" confirmoverwrite="no" droponreinstall="no" createonreinstall="yes" droponuninstall="yes" continueonerror="no">
<sql:sqlscript id="user-content-CreateTable" binarykey="CreateTable" executeoninstall="yes" executeonreinstall="yes">
</sql:sqlscript></sql:sqldatabase>
BUT: If I use the DropOnReinstall="yes" attribute and the CreateOnReinstall="yes" attribute, the databse is not deleted and recreated, though in the log file everything looks good:
<sql:sqldatabase id="user-content-SqlDatabase" database="Foobar" user="SQLUser" server="<span>[SQLSERVER]</span>,<span>[SQLSERVERPORT]</span>" createoninstall="yes" confirmoverwrite="no" droponreinstall="yes" createonreinstall="yes" droponuninstall="yes" continueonerror="no">
<sql:sqlscript id="user-content-CreateTable" binarykey="CreateTable" executeoninstall="yes" executeonreinstall="no">
</sql:sqlscript></sql:sqldatabase>
and the log file:
MSI (s) (B4:C0) [11:55:02:894]: Doing action: UninstallSqlData
Action 11:55:02: UninstallSqlData. Configuring SQL Server
Action start 11:55:02: UninstallSqlData.
MSI (s) (B4:C0) [11:55:02:894]: Creating MSIHANDLE (676) of type 790542 for thread 1984
MSI (s) (B4:D4) [11:55:02:894]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI171.tmp, Entrypoint: UninstallSqlData
MSI (s) (B4:2C) [11:55:02:894]: Generating random cookie.
MSI (s) (B4:2C) [11:55:02:909]: Created Custom Action Server with PID 3400 (0xD48).
MSI (s) (B4:48) [11:55:02:956]: Running as a service.
MSI (s) (B4:48) [11:55:02:956]: Hello, I'm your 32bit Impersonated custom action server.
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (677) of type 790541 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (678) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (678) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (679) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (679) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (680) of type 790540 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (681) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (681) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (680) of type 790540 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (682) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (682) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (683) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (683) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (684) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (684) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (685) of type 790540 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (686) of type 790540 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Creating MSIHANDLE (687) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (687) of type 790531 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (685) of type 790540 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (686) of type 790540 for thread 1464
MSI (s) (B4!B8) [11:55:02:972]: Closing MSIHANDLE (677) of type 790541 for thread 1464
MSI (s) (B4:D4) [11:55:02:972]: Closing MSIHANDLE (676) of type 790542 for thread 1984
Action ended 11:55:02: UninstallSqlData. Return value 1.
MSI (s) (B4:C0) [11:55:02:972]: Doing action: RemoveFiles
Action 11:55:02: RemoveFiles. Removing files
Action start 11:55:02: RemoveFiles.
MSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2205 2: 3: RemoveFile
MSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2205 2: 3: RemoveFile
Action ended 11:55:02: RemoveFiles. Return value 0.
MSI (s) (B4:C0) [11:55:02:972]: Doing action: InstallFiles
Action 11:55:02: InstallFiles. Copying new files
Action start 11:55:02: InstallFiles.
MSI (s) (B4:C0) [11:55:02:972]: The file represented by File table key 'FoobarEXE' has no eligible binary patches
MSI (s) (B4:C0) [11:55:02:972]: The file represented by File table key 'HelperDLL' has no eligible binary patches
MSI (s) (B4:C0) [11:55:02:972]: The file represented by File table key 'Manual' has no eligible binary patches
MSI (s) (B4:C0) [11:55:02:972]: The file represented by File table key 'WindowsService' has no eligible binary patches
InstallFiles: File: Copying new files, Directory: , Size:
MSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2205 2: 3: Patch
MSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2228 2: 3: Patch 4: SELECT
Patch.File_,Patch.Header,Patch.Attributes,Patch.Sequence,Patch.StreamRef_FROMPatchWHEREPatch.File_= ? ANDPatch.#_MsiActive=? ORDER BYPatch.SequenceMSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2205 2: 3: MsiSFCBypass
MSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2228 2: 3: MsiSFCBypass 4: SELECT
File_FROMMsiSFCBypassWHEREFile_= ?MSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2205 2: 3: MsiPatchHeaders
MSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2228 2: 3: MsiPatchHeaders 4: SELECT
HeaderFROMMsiPatchHeadersWHEREStreamRef= ?MSI (s) (B4:C0) [11:55:02:972]: Using cached product context: User non-assigned for product: 62D7153D3C8B93842A2A2640E2C6785C
MSI (s) (B4:C0) [11:55:02:972]: Using cached product context: User non-assigned for product: 62D7153D3C8B93842A2A2640E2C6785C
MSI (s) (B4:C0) [11:55:02:972]: Using cached product context: User non-assigned for product: 62D7153D3C8B93842A2A2640E2C6785C
MSI (s) (B4:C0) [11:55:02:972]: Note: 1: 2205 2: 3: PatchPackage
Action ended 11:55:02: InstallFiles. Return value 1.
MSI (s) (B4:C0) [11:55:02:972]: Doing action: InstallSqlData
Action 11:55:02: InstallSqlData. Configuring SQL Server
Action start 11:55:02: InstallSqlData.
MSI (s) (B4:C0) [11:55:02:988]: Creating MSIHANDLE (688) of type 790542 for thread 1984
MSI (s) (B4:70) [11:55:02:988]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI172.tmp, Entrypoint: InstallSqlData
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (689) of type 790541 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (690) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (690) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (691) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (691) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (692) of type 790540 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (693) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (694) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (694) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (695) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (695) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (696) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (696) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (697) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (698) of type 790540 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (697) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (699) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (700) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (700) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (701) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (701) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (699) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (698) of type 790540 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (693) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (692) of type 790540 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (702) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (702) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (703) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (703) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (704) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (704) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (705) of type 790540 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (706) of type 790540 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (707) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Creating MSIHANDLE (708) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (707) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (708) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (705) of type 790540 for thread 2796
MSI (s) (B4!EC) [11:55:03:003]: Closing MSIHANDLE (706) of type 790540 for thread 2796
MSI (s) (B4!EC) [11:55:03:128]: PROPERTY CHANGE: Adding CreateDatabase property. Its value is 'SqlDatabaselocalhost,4364Foobar1950aa00'.
MSI (s) (B4!EC) [11:55:03:128]: Creating MSIHANDLE (709) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:128]: Closing MSIHANDLE (709) of type 790531 for thread 2796
MSI (s) (B4!EC) [11:55:03:128]: Doing action: CreateDatabase
Action 11:55:03: CreateDatabase. Creating Databases
Action start 11:55:03: CreateDatabase.
1: Creating Databases
Action ended 11:55:03: CreateDatabase. Return value 1.
MSI (s) (B4!EC) [11:55:03:128]: Closing MSIHANDLE (689) of type 790541 for thread 2796
MSI (s) (B4:70) [11:55:03:128]: Closing MSIHANDLE (688) of type 790542 for thread 1984
Action ended 11:55:03: InstallSqlData. Return value 1.
But I want to be sure, that I have a fresh database after reinstalling, so I first need to drop the database and then recreate it. So, is this still a bug?
Thanks
Daniel
Logged In: YES
user_id=26581
Originator: NO
Updated title with new bug.
Logged In: YES
user_id=2181115
Originator: YES
Hi there,
just wondering what's the status of this bug, is somebody having a look at it or do you need more information?
Would be great to have a solution for this issue.
Bye
Daniel
Logged In: YES
user_id=991639
Originator: NO
Just takes us time to get to some bugs. You're lucky... one bug has been open for 2 years. <wink></wink>
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 15 days (the time period specified by
the administrator of this Tracker).