I have seen this error when the username or password is incorrect. How are you trying to access the database: via windows or server authentication?
If you are trying to access sql express via a user name (probably sa?) and password, did you install SQL Express in mixed mode and specify a sa password? If you are using windows authentication, don't specify a user or password. This is some code that I use to do database installs on sql express 2005 and sql server 2005. I have custom screens in my installer that get values for these properties (You could hard code values for them): SQLSERVER_AUTHENTICATION (Windows or Server) SELECTEDSQLSERVER (name of the database server to use [MyComputer\SQLEXPRESS]) DBAUSERNAME (usually sa, can be any user with the correct admin permissions) DBAPASSWORD (admin user password) <util:User Id="SQLAdminUser" Name="[DBAUSERNAME]" Password="[DBAPASSWORD]"/> <Binary Id="CreateDbSqlSCript" SourceFile="some-path-to-scripts\db_create.sql"/> <ComponentGroup Id="CreateDBServerAuth"> <Component Id="CreateDatabaseServer" Directory="INSTALLDIR" Guid="{DF7D8FA0-893A-4fe6-B875-EE95592311F6}"> <Condition> (NOT OLDERVERSIONBEINGUPGRADED) AND (NOT Installed) AND (SQLSERVER_AUTHENTICATION = "Server") </Condition> <CreateFolder Directory="INSTALLDIR"/> <sql:SqlDatabase Id="SqlDbServer" Database="my-db-name" Server="[SELECTEDSQLSERVER]" User="SQLAdminUser" CreateOnInstall="yes" DropOnUninstall="no"> </sql:SqlDatabase> </Component> </ComponentGroup> <ComponentGroup Id="CreateTablesDataServerAuth"> <Component Id="CreateDatabaseTablesAndDataServer" DiskId="1" KeyPath="yes" Directory="INSTALLDIR" Guid="{B71DCA42-40AC-4316-9853-36FD28F77500}"> <Condition> (NOT OLDERVERSIONBEINGUPGRADED) AND (NOT Installed) AND (SQLSERVER_AUTHENTICATION = "Server") </Condition> <sql:SqlScript Id="script1" BinaryKey="CreateDbSqlSCript" SqlDb="SqlDbServer" User="SQLAdminUser" ExecuteOnInstall="yes" ExecuteOnUninstall="no" ContinueOnError="no" Sequence="1"/> . . . </Component> </ComponentGroup> <ComponentGroup Id="CreateDBWindowsAuth"> <Component Id="CreateDatabaseWindows" Directory="INSTALLDIR" Guid="{9B653419-930D-4134-8C3B-7588DEA154CF}"> <Condition> (NOT OLDERVERSIONBEINGUPGRADED) AND (NOT Installed) AND (SQLSERVER_AUTHENTICATION = "Windows") </Condition> <CreateFolder Directory="INSTALLDIR"/> <sql:SqlDatabase Id="SqlDbWindows" Database="my-db-name" Server="[SELECTEDSQLSERVER]" CreateOnInstall="yes" DropOnUninstall="no"> </sql:SqlDatabase> </Component> </ComponentGroup> <ComponentGroup Id="CreateTablesDataWindowsAuth"> <Component Id="CreateDatabaseTablesAndDataWindows" DiskId="1" KeyPath="yes" Directory="INSTALLDIR" Guid="{098D6F93-4964-4989-A467-92A37719C4A8}"> <Condition> (NOT OLDERVERSIONBEINGUPGRADED) AND (NOT Installed) AND (SQLSERVER_AUTHENTICATION = "Windows") </Condition> <sql:SqlScript Id="script1" BinaryKey="CreateDbSqlSCript" SqlDb="SqlDbWindows" ExecuteOnInstall="yes" ExecuteOnUninstall="no" ContinueOnError="no" Sequence="1"/> . . . </Component> </ComponentGroup> Hope this helps. *Mike Rerick* *Sr. Software Engineer* [image: Google Docs] <http://www.iwsinc.com>*ImageWare Systems, Inc.* 9200 S.E. Sunnybrook Blvd., Suite 170 Clackamas, OR 97015 Office: (503) 353-8068 Fax: (503) 353-8065 On Thu, Mar 17, 2011 at 12:04 PM, kim <contactme...@gmail.com> wrote: > Can someone please help me with this issue? > > I checked that Network Service account was not having full control > permission on C:\Program Files\Microsoft SQL Server folder and subfolders > where is the default path to create database. > > Still database creation is failing with this error (as mentioned in subject > of this post) > > I am installing my application on XP machine and database is SQL Server > 2008. Verbose log and Event viewer do not provide any more info except this > same error message > > I am really stuck here with no clue to proceed further! > > thanks! > > -- > View this message in context: > http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Error-26201-Error-2147467259-failed-to-create-SQL-database-tp6163225p6182144.html > Sent from the wix-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > The information contained in this transmission contains potentially privileged, export controlled and/or confidential information of Imageware Systems, Inc. or its customers or partners. It is intended only to be read by the person(s) named above and for no other purpose. You are hereby notified that any dissemination, distribution, duplication of this communication or use of its contents for any purpose not authorized expressly by Imageware Systems, Inc. is strictly prohibited and could lead to both civil and/or criminal penalties. If you are not the intended recipient, you are prohibited to review the contents herein and please contact the sender by reply e-mail and destroy all copies of the original message. To reply to our e-mail administrator directly, please send an e-mail to emailad...@iwsinc.com ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users