[wix-users] WiX element for SQL File Group

Edwin Castro egcastr at gmail.com
Sun Apr 29 08:51:26 PDT 2018


Fair enough.

I didn't remember what mdf, ndf, and ldf files were so I looked that up
that up first. I found out they were primary data file (mdf, you can only
have one of these), secondary data files (ndf, you can have zero or more of
these), and log file (ldf, I didn't check how many you can have).

I then checked the wix documentation starting with SqlFileSpec. I wanted to
know if you could have multiple SqlFileSpec elements. I was hoping it did
and the first was primary and others were secondary OR the SqlFileSpec
elements had a type attribute or something similar. Unfortunately,
SqlFileSpec didn't have an attribute for these and SqlDatabase only allows
a single SqlFileSpec.

Then I googled for something like wix sqlfilespec secondary data file and
found fairly quickly (first to third result) the link to that old email
thread that confirmed only one sqlfilespec was supported (apparently back
then candle allowed multiple elements but they overwrote each other so only
the last one really mattered). Of course, reading the entire thread lead to
finding the alter strategy as a workaround.

The entire research took about five minutes. I responded on my phone so it
took longer to type the response email than it took to find the workaround.

The other thing you could do is contribute a fix that adds support for
secondary data files! ;-)

--
Edwin G. Castro


On Sun, Apr 29, 2018, 02:04 Ven H <venh.123 at gmail.com> wrote:

> Thank you very much Edwin. I myself should have found that out. But I was
> not sure what / how to search. Anyway, thanks a lot.
>
> Regards,
> Venkatesh
>
> On Sun, Apr 29, 2018 at 12:15 AM, Edwin Castro <egcastr at gmail.com> wrote:
>
>> The documentation for SqlDatabase suggests that secondary data files are
>> not supported. I spent less than five minutes on google and found
>> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/SqlDatabase-with-multiple-data-files-td1091069.html
>> which suggests using a SqlString after creating the database to alter the
>> database to use secondary data files.
>>
>> --
>> Edwin G. Castro
>>
>>
>> On Sat, Apr 28, 2018, 11:22 Ven H via wix-users <
>> wix-users at lists.wixtoolset.org> wrote:
>>
>>> Can anyone please provide any input on this?
>>>
>>> Regards,
>>> Venkatesh
>>>
>>> On Fri, Apr 27, 2018 at 1:18 PM, Ven H <venh.123 at gmail.com> wrote:
>>>
>>> > For SQL installation through MSI, we use SqlFileSpec for mdf file
>>> (data)
>>> > and SqlLogFileSpec for ldf file (log) for specifying the path. In my
>>> > scenario, there is a file group (ndf) file also. For this, how should I
>>> > handle? Please help.
>>> >
>>>
>>> ____________________________________________________________________
>>> WiX Toolset Users Mailing List provided by FireGiant
>>> http://www.firegiant.com/
>>>
>>
>


More information about the wix-users mailing list