There are a lot of ways for a SQL database create to fail. The client side messages won't tell you much. Turn on profiling on the server side and look at the server side logs for clues. Usually, the user lacks the necessary permissions and/or roles to create the database and/or run scripts against it.
-- John Merryweather Cooper Build & Install Engineer - ESA Jack Henry & Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -----Original Message----- From: garymonk [mailto:g...@gurudental.com] Sent: Tuesday, August 5, 2014 3:58 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Unable to execute sql scripts Hi, I'm new to WIX and I'm having some problems executing SQL scripts. I have looked at a number of posts and none of them have worked. I have also looked for any SQL Server logs that would help and I couldn't find any. The error messages that I'm receiving in the install log are... CreateDatabase: Error 0x80004005: failed to create to database: 'MVDB', error: unknown error Error 26201. Error -2147467259: failed to create SQL database: MVDB, error detail: unknown error. MSI (s) (A4!F4) [13:21:44:978]: Product: Guru 6 -- Error 26201. Error -2147467259: failed to create SQL database: MVDB, error detail: unknown error. CustomAction CreateDatabase returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) My code looks like this... <Binary Id="CreateDatabaseSql" SourceFile="C:\VS Publish\SQL Scripts\CreateDatabase.sql" /> <Binary Id="CreateUsersSql" SourceFile="C:\VS Publish\SQL Scripts\CreateUsers.sql" /> <Binary Id="CreateBaseLineDbSql" SourceFile="C:\VS Publish\SQL Scripts\CreateBaseLineDb.sql" /> <Binary Id="RemoveOldContentSql" SourceFile="C:\VS Publish\SQL Scripts\RemoveOldContent.sql" /> <Binary Id="UpgradeSql" SourceFile="C:\VS Publish\SQL Scripts\Upgrade.sql" /> <Binary Id="AddCompleteMediaSql" SourceFile="C:\VS Publish\SQL Scripts\Upgrade.sql" /> <Binary Id="InstallContentSql" SourceFile="C:\VS Publish\SQL Scripts\InstallContent.sql" /> <Binary Id="UpdateCustomPlayListSql" SourceFile="C:\VS Publish\SQL Scripts\UpdateCustomPlayList.sql" /> <Binary Id="InstallFeaturedContentSql" SourceFile="C:\VS Publish\SQL Scripts\InstallFeaturedContent.sql" /> <DirectoryRef Id="SERVER"> <Component Id='Server.exe' Guid='8027388d-0f90-465b-9668-d1388977caaa'> <File Id='Server.exe' Source='C:\VS Publish\ProgramFiles\Server\Server.exe' KeyPath='yes'/> <ServiceInstall Id="ServiceInstaller" Type="ownProcess" Name="Service" DisplayName="Service" Description="Provides media distribution, data coordination, and licensing services to the application" Start="auto" Account="[SERVICEACCOUNT]" Password="[SERVICEPASSWORD]" ErrorControl="normal" /> <ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="Service" Wait="yes" /> <util:User Id="SQLUser" Name="[ComputerName]\[%USERNAME]" CreateUser="no"/> <sql:SqlDatabase Id="SqlDatabase" Database="MVDB" Server=".\MVSQLEXPRESS" Instance="MVSQLEXPRESS" CreateOnInstall="yes" DropOnUninstall="yes" ContinueOnError="no" User="SQLUser"> <sql:SqlScript Id="CreateDatabase" ExecuteOnInstall="yes" BinaryKey="CreateDatabaseSql" /> <sql:SqlScript Id="CreateUsers" ExecuteOnInstall="yes" BinaryKey="CreateUsersSql" /> <sql:SqlScript Id="CreateBaseLineDb" ExecuteOnInstall="yes" BinaryKey="CreateBaseLineDbSql" /> <sql:SqlScript Id="RemoveOldContent" ExecuteOnInstall="yes" BinaryKey="RemoveOldContentSql" /> <sql:SqlScript Id="Upgrade" ExecuteOnInstall="yes" BinaryKey="UpgradeSql" /> <sql:SqlScript Id="AddCompleteMedia" ExecuteOnInstall="yes" BinaryKey="AddCompleteMediaSql" /> <sql:SqlScript Id="InstallContent" ExecuteOnInstall="yes" BinaryKey="InstallContentSql" /> <sql:SqlScript Id="UpdateCustomPlayList" ExecuteOnInstall="yes" BinaryKey="UpdateCustomPlayListSql" /> <sql:SqlScript Id="InstallFeaturedContent" ExecuteOnInstall="yes" BinaryKey="InstallFeaturedContentSql" /> </sql:SqlDatabase> </Component> I have also used... <util:User Id="SQLUser" Name="[%USERNAME]" Domain="[ComputerName]" CreateUser="no"/> I also tried removing the user altogether from the sql:sqldatabase entry. I have checked that all of the network protocols are enabled for the instance and that there is enough disk space for the database. I would appreciate any help!! Thanks, Gary -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Unable-to-execute-sql-scripts-tp7596243.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users