John,

I have not used merge modules, so not sure what they would do to the MSI.

For debuging the custom action, you need to get the source code for WIX, then 
there is a line (I think it is an Asert) at the start of each action that you 
uncomment and compile the custom action.   My understanding is gets you a point 
in the install where you can attach the debuger (I have not tried this myself).

I didn't think of the fact that profiler is not in SQL Express.   Do you have a 
copy of SQL Standard or Developer, even on another machine?  You could use 
those, and connect to the Express instance on your machine (you may need to 
change the Surface Area Configuration to allow remote connections.

Profiler is just a graphic interface into a number of stored procedures - so 
you can actually setup traces from the stored procedures, and even import the 
trace files into a table for examination.   Check out www.sqlservercentral.com 
there may be some pointers there (its a fairly useful site of things SQL).

The SQL below will create a standard profiler trace to a file then use 
fn_trace_gettable to import the file into an SQL Table to do examine (example 
of this also included).    Not pretty, but may do what you need.


-- Create a Trace 

declare @rc int
declare @TraceID int
declare @maxfilesize bigint
set @maxfilesize = 5 
-- Please replace the text InsertFileNameHere, with an appropriate
-- filename prefixed by a path, e.g., c:\MyFolder\MyTrace. The .trc extension
-- will be appended to the filename automatically. If you are writing from
-- remote server to local drive, please use UNC path and make sure server has
-- write access to your network share
exec @rc = sp_trace_create @TraceID output, 0, N'InsertFileNameHere', 
@maxfilesize, NULL 
if (@rc != 0) goto error
-- Client side File and Table cannot be scripted
-- Set the events
declare @on bit
set @on = 1
exec sp_trace_setevent @TraceID, 10, 15, @on
exec sp_trace_setevent @TraceID, 10, 16, @on
exec sp_trace_setevent @TraceID, 10, 9, @on
exec sp_trace_setevent @TraceID, 10, 17, @on
exec sp_trace_setevent @TraceID, 10, 2, @on
exec sp_trace_setevent @TraceID, 10, 10, @on
exec sp_trace_setevent @TraceID, 10, 18, @on
exec sp_trace_setevent @TraceID, 10, 34, @on
exec sp_trace_setevent @TraceID, 10, 3, @on
exec sp_trace_setevent @TraceID, 10, 11, @on
exec sp_trace_setevent @TraceID, 10, 12, @on
exec sp_trace_setevent @TraceID, 10, 13, @on
exec sp_trace_setevent @TraceID, 10, 6, @on
exec sp_trace_setevent @TraceID, 10, 14, @on
exec sp_trace_setevent @TraceID, 12, 15, @on
exec sp_trace_setevent @TraceID, 12, 16, @on
exec sp_trace_setevent @TraceID, 12, 1, @on
exec sp_trace_setevent @TraceID, 12, 9, @on
exec sp_trace_setevent @TraceID, 12, 17, @on
exec sp_trace_setevent @TraceID, 12, 6, @on
exec sp_trace_setevent @TraceID, 12, 10, @on
exec sp_trace_setevent @TraceID, 12, 14, @on
exec sp_trace_setevent @TraceID, 12, 18, @on
exec sp_trace_setevent @TraceID, 12, 3, @on
exec sp_trace_setevent @TraceID, 12, 11, @on
exec sp_trace_setevent @TraceID, 12, 12, @on
exec sp_trace_setevent @TraceID, 12, 13, @on
exec sp_trace_setevent @TraceID, 13, 12, @on
exec sp_trace_setevent @TraceID, 13, 1, @on
exec sp_trace_setevent @TraceID, 13, 9, @on
exec sp_trace_setevent @TraceID, 13, 6, @on
exec sp_trace_setevent @TraceID, 13, 10, @on
exec sp_trace_setevent @TraceID, 13, 14, @on
exec sp_trace_setevent @TraceID, 13, 3, @on
exec sp_trace_setevent @TraceID, 13, 11, @on

-- Set the Filters
declare @intfilter int
declare @bigintfilter bigint
exec sp_trace_setfilter @TraceID, 10, 0, 7, N'SQL Server Profiler - 
5fe34092-7539-43f5-8669-5ab529b76047'
-- Set the trace status to start
exec sp_trace_setstatus @TraceID, 1
-- display trace id for future references
select trace...@traceid
goto finish
error: 
select errorco...@rc
finish: 
go




// Import into table

SELECT * INTO temp_trc
FROM fn_trace_gettable('c:\temp\my_trace.trc', default);



Michael



________________________________________
From: John Stevenson-Hoare [john.stevenson-ho...@ffei.co.uk]
Sent: Monday, 27 July 2009 6:06 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Help: 'Error 26201.Error -2147467259: failed to create 
SQL database'

Hi Michael,

The property SQLSERVER is being set to '(local)\SQLEXPRESS' from within the
MSI database, although if I edit this using Orca to some other value it gets
reset back to the above value when the setup program is run (as observed
from the log file).

I think that the above value is correct because I use this value in own WiX
generated installation and everything installs just fine.

I do not think that there is a problem with SQL Express as I have been using
it for many months now without problem.

What confuses me the most is why the same merge module works fine on my
machine using my own WiX generated installer but does not work when it is
integrated with the InstallShield setup program. The same property value is
being used and it is run on the same PC using the same account.

The problem must be something to do with what the setup program is doing.

I cannot try SQL Profiler as this is not supplied with SQL Express (can I?
If so, where do I get it from?). However I tried using Teratrax Performance
Viewer which has some similar functionality, which at least lets me log
failed connection attempts, but it reported nothing.

I am still stuck. Is there any way to debug the steps that the installer is
performing to see exactly where the error is generated and perhaps try some
alternative values?

John


Michael Osmond wrote:
>
> John,
>
> Firstly what value is the property SQLSERVER being set to, and where is it
> set?
>
> If that is okay, then i suspect it is a SQL Express set up issue.
>
> The 0x80004005 error could also be an access denied error from the file
> system - it does not look like you are specifying a path to where the
> database files are being located.  When SQL server does something it
> actually executes using the SQL Service account - so the creation of the
> underlying database files are performed as that account not the installing
> account - I have seen this cause some interesting file permission issues.
>
> Have you tried the InstallShield setup on different machines?
> You could try running the SQL Profiler to trace what is happening in SQL
> Express during the install.
> You could also try using SQLCMD to do a Create Database on the problem
> machine, just to see what happens.
>
> You are right about the User attribute, it lets WIX use an SQL User rather
> than a Windows Account, as far as I know you can't disable Windows
> Integrated Auth in SQL 2005, so for that reason I don't use the User
> attribute.
>
> What role does the user doing the install have in the SQL Express system.
> By default the Administrators group should be an SQL Admin - but you may
> need to double check this.
>
> Hope this helps
>
> Michael
>

--
View this message in context: 
http://n2.nabble.com/Help%3A-%27Error-26201.Error--2147467259%3A-failed-to-create-SQL-database%27-tp3314870p3332575.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to