Re: [WiX-users] Unable to execute sql scripts

2014-08-06 Thread garymonk
The current user is created as a sysadmin when SQL Server is installed. This
is done as part of a bundle just prior to running the install that creates
the database.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Unable-to-execute-sql-scripts-tp7596243p7596256.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=153845071iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Unable to execute sql scripts

2014-08-06 Thread garymonk
I have resolved the problem by moving the sqldatabase element outside of a
component. By doing that it the installer is not trying to create the
database (I have a script for that) and I no longer need a until:user and
the installer seems to be using the current user to run the SQL scripts.

Here is my code...

sql:SqlDatabase Id=SqlDatabase Database=master Server=localhost
Instance=MVSQLEXPRESS /

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=Media and Licensing Service
  Description=Provides media distribution
  Start=auto
  Account=[SERVICEACCOUNT]
  Password=[SERVICEPASSWORD]
  ErrorControl=normal
  /
ServiceControl Id=StartService Start=install Stop=both
Remove=uninstall Name=Service Wait=yes /
sql:SqlScript Id=CreateDatabase ExecuteOnInstall=yes
BinaryKey=CreateDatabaseSql SqlDb=SqlDatabase/
sql:SqlScript Id=CreateUsers ExecuteOnInstall=yes
BinaryKey=CreateUsersSql SqlDb=SqlDatabase/
sql:SqlScript Id=CreateBaseLineDb ExecuteOnInstall=yes
BinaryKey=CreateBaseLineDbSql SqlDb=SqlDatabase/
sql:SqlScript Id=RemoveOldContent ExecuteOnInstall=yes
BinaryKey=RemoveOldContentSql SqlDb=SqlDatabase/
sql:SqlScript Id=Upgrade ExecuteOnInstall=yes
BinaryKey=UpgradeSql SqlDb=SqlDatabase/
sql:SqlScript Id=AddCompleteMedia ExecuteOnInstall=yes
BinaryKey=AddCompleteMediaSql SqlDb=SqlDatabase/
sql:SqlScript Id=InstallContent ExecuteOnInstall=yes
BinaryKey=InstallContentSql SqlDb=SqlDatabase/
sql:SqlScript Id=UpdateCustomPlayList ExecuteOnInstall=yes
BinaryKey=UpdateCustomPlayListSql SqlDb=SqlDatabase/
sql:SqlScript Id=InstallFeaturedContent ExecuteOnInstall=yes
BinaryKey=InstallFeaturedContentSql SqlDb=SqlDatabase/
  /Component

Thanks for the help!!
Gary



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Unable-to-execute-sql-scripts-tp7596243p7596259.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=153845071iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Unable to execute sql scripts

2014-08-05 Thread garymonk
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=153845071iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Unable to execute sql scripts

2014-08-05 Thread John Cooper
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

Re: [WiX-users] Unable to execute sql scripts

2014-08-05 Thread garymonk
Thanks for the reply.

The database is on the local machine. I'm not sure how to turn on profiling
but I will take a look. One thing I forgot to mention is that the scripts
will run in SQL Server Management Console under the same user that is in the
user element. I was wondering if the user and domain combination on the
util:user element was the same as the domain\user that I use to sign in to
the database through the console.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Unable-to-execute-sql-scripts-tp7596243p7596245.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=153845071iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Unable to execute sql scripts

2014-08-05 Thread garymonk
I changed the util:user to use sa as the user and it worked. So the problem
is definitely a permissions issue.

The problem is that I have to be able to use Windows authentication. When
the database is created the flag is set to create the current user as an
administrator (ADDCURRENTUSERASSQLADMIN=True). Also I can see the current
user as an administrator. 

How do I have WIX create the database using the current user? 



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Unable-to-execute-sql-scripts-tp7596243p7596246.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=153845071iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Unable to execute sql scripts

2014-08-05 Thread John Cooper
In my experience, the user for either SQL Authentication or Windows 
(Integrated) Authentication, must already be defined on the SQL server.  In 
general, SQL Server won't let a party installing a database from an installer 
bootstrap it's own credentials.
--
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


From: garymonk [g...@gurudental.com]
Sent: Tuesday, August 05, 2014 6:25 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Unable to execute sql scripts

I changed the util:user to use sa as the user and it worked. So the problem
is definitely a permissions issue.

The problem is that I have to be able to use Windows authentication. When
the database is created the flag is set to create the current user as an
administrator (ADDCURRENTUSERASSQLADMIN=True). Also I can see the current
user as an administrator.

How do I have WIX create the database using the current user?



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Unable-to-execute-sql-scripts-tp7596243p7596246.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=153845071iu=/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=153845071iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users