My understanding, this is the expected behavior. The component is being
rolled back, so if the component created the database on install, and a
rollback occurs, the database will be deleted to completely rollback the
entire transaction.

During an upgrade, you can't use that same <sql:SqlDatabase> inside the
component. You need to use a different <sql:SqlDatabase> that isn't inside
of a component.

On Wed, Jun 3, 2009 at 9:15 AM, Jason Jibben <jason_jib...@starkey.com>wrote:

> Hello WiX folks,
>
> I've recently upgraded a WiX 2.0 installer to WiX 3.0 and a new behavior
> started up. When I run into an error on install while it's running SQL
> scripts, it begins a rollback and attempts to drop the DB. Luckily for me,
> it threw "you don't have permission" errors that caught my attention.
>
> I've added all the "DropOn...="no"" options I could to it and it's still
> attempting to drop the DB on rollback. They only "Fix" for now is to disable
> rollbacks all together.  Here's my code:
>
> <Component Id="SQLCreateFooDB" Guid="GUID-IS-GOOD" >
> <sql:SqlDatabase Id="FooDB" Database="Foo" Server="[SQLSERVERNAME]"
> User="SQLUser" CreateOnInstall="yes" DropOnUninstall="no" DropOnInstall="no"
> DropOnReinstall="no">
>            <sql:SqlScript Id="FooDB.sql" ExecuteOnInstall="yes"
> BinaryKey="FooDB" Sequence="1"/>
>      </sql:SqlDatabase>
> </Component>
>
> And the error I'm getting is:
> MSI (s) (0C:50) [09:41:00:122]: Executing op:
> ActionStart(Name=RollbackCreateDatabase,,)
> MSI (s) (0C:50) [09:41:00:122]: Executing op:
> CustomActionRollback(Action=RollbackCreateDatabase,ActionType=25857,Source=BinaryData,Target=**********,CustomActionData=**********)
> MSI (s) (0C:FC) [09:41:00:137]: Invoking remote custom action. DLL:
> C:\WINDOWS\Installer\MSI30A.tmp, Entrypoint: DropDatabase
> DropDatabase:  Error 0x80040e37: failed to drop to database: 'Foo', error:
> Cannot drop the database 'Foo', because it does not exist or you do not have
> permission.
> Error 26202. Error -2147217865: failed to drop SQL database: Foo, error
> detail: Cannot drop the database 'Foo', because it does not exist or you do
> not have permission..
> MSI (s) (0C!34) [09:41:00:684]: Product: Foo -- Error 26202. Error
> -2147217865: failed to drop SQL database: Foo, error detail: Cannot drop the
> database 'Foo', because it does not exist or you do not have permission..
>
>
> The SQL statements work fine, I've been able to install with out problem.
> This only comes up on a test where I cancel the install, or I edit the
> sequence that would cause an error.   This is happenign on both new DB
> creation, and upgrading existing DBs.
>
> Any suggestions?
>
> --
> Jason
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to