1
<?xml version="1.0" encoding="utf-8"?>
2
<xs:schema xmlns:html="http://www.w3.org/1999/xhtml"
3
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
4
xmlns:xs="http://www.w3.org/2001/XMLSchema"
5
xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension"
6
targetNamespace="http://schemas.microsoft.com/wix/SqlExtension"
7
xmlns="http://schemas.microsoft.com/wix/SqlExtension">
10
Copyright (c) Microsoft Corporation. All rights reserved.
12
The use and distribution terms for this software are covered by the
13
Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php)
14
which can be found in the file CPL.TXT at the root of this distribution.
15
By using this software in any fashion, you are agreeing to be bound by
16
the terms of this license.
18
You must not remove this notice, or any other, from this software.
20
The source code schema for the Windows Installer XML Toolset SQL Server Extension.
24
<xs:import namespace="http://schemas.microsoft.com/wix/2006/wi" />
26
<xs:element name="SqlDatabase">
29
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Component" />
30
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Fragment" />
31
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Module" />
32
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Product" />
35
<html:dd>Nesting SqlDatabase under a Component element will result in a SqlDatabase being installed to the machine as the package is installed.</html:dd>
37
Nesting SqlDatabase under Product, Fragment, or Module
38
results in a database "locator" record being created in
39
the SqlDatabase table. This means that the database
40
itself is neither installed nor uninstalled by the MSI
41
package. It does make the database available for referencing
42
from a SqlString or SqlScript record. This allows MSI to install
43
SqlScripts or SqlStrings to already existing databases on the machine.
44
The install will fail if the database does not exist in these cases.
47
The User attribute references credentials specified in a User element.
48
If a user is not specified then Windows Authentication will be used by default
49
using the credentials of the user performing the install to execute sql
54
<xse:seeAlso ref="User"/>
56
<xs:documentation>SQL Database</xs:documentation>
59
<xs:choice minOccurs="0" maxOccurs="unbounded">
61
<xs:element ref="SqlFileSpec" minOccurs="0"/>
62
<xs:element ref="SqlLogFileSpec" minOccurs="0"/>
64
<xs:element ref="SqlScript"/>
65
<xs:element ref="SqlString"/>
67
<xs:attribute name="Id" use="required" type="xs:string"/>
68
<xs:attribute name="Server" use="required" type="xs:string">
70
<xs:attribute name="Instance" type="xs:string">
72
<xs:attribute name="Database" use="required" type="xs:string">
75
The name of the database. The value can be a literal value or derived from a
76
Property element using the <html:a href='http://msdn.microsoft.com/library/aa368609.aspx' target='_blank'>Formatted</html:a>
81
<xs:attribute name="User" type="xs:string">
83
<xs:attribute name="CreateOnInstall" type="YesNoType">
85
<xs:attribute name="CreateOnReinstall" type="YesNoType">
88
Specifies whether to create the database when the associated component is reinstalled. Setting CreateOnInstall to yes does <html:b>not</html:b> imply CreateOnReinstall is set to yes. CreateOnReinstall must be set in addition to CreateOnInstall for it to be created during both install and reinstall.
92
<xs:attribute name="CreateOnUninstall" type="YesNoType">
94
<xs:attribute name="DropOnInstall" type="YesNoType">
96
<xs:attribute name="DropOnReinstall" type="YesNoType">
99
Specifies whether to drop the database when the associated component is reinstalled. Setting DropOnInstall to yes does <html:b>not</html:b> imply DropOnReinstall is set to yes. DropOnReinstall must be set in addition to DropOnInstall for it to be dropped during both install and reinstall.
103
<xs:attribute name="DropOnUninstall" type="YesNoType">
105
<xs:attribute name="ContinueOnError" type="YesNoType">
107
<xs:attribute name="ConfirmOverwrite" type="YesNoType">
112
<xs:element name="SqlFileSpec">
114
<xs:documentation>File specification for a Sql database.</xs:documentation>
117
<xs:attribute name="Id" use="required" type="xs:string">
119
<xs:documentation>ID of the file specification.</xs:documentation>
122
<xs:attribute name="Name" type="xs:string">
124
<xs:documentation>Specifies the logical name for the database file.</xs:documentation>
127
<xs:attribute name="Filename" use="required" type="xs:string">
129
<xs:documentation>Specifies the operating-system file name for the database file.</xs:documentation>
132
<xs:attribute name="Size" type="xs:string">
135
Specifies the size of the database file. The GB, MB and KB suffixes can be used to specify gigabytes,
136
megabytes or kilobytes. The default is megabytes if no suffix is specified. When a Size is not
137
supplied for a database file, SQL Server uses the size of the primary file in the model database.
141
<xs:attribute name="MaxSize" type="xs:string">
144
Specifies the maximum size to which the database file can grow. The GB, MB and KB suffixes can be used to
145
to specify gigabytes, megabytes or kilobytes. The default is megabytes if no suffix is specified. If
146
MaxSize is not specified, the file will grow until the disk is full.
150
<xs:attribute name="GrowthSize" type="xs:string">
153
Specifies the growth increment of the database file. The GB, MB and KB and % suffixes can be used to
154
specify gigabytes, megabytes, kilobytes or a percentage of the current file size to grow. The default is
155
megabytes if no suffix is specified. The default value is 10% if GrowthSize is not specified, and the
156
minimum value is 64 KB. The GrowthSize setting for a file cannot exceed the MaxSize setting.
163
<xs:element name="SqlLogFileSpec">
165
<xs:documentation>File specification for a Sql database.</xs:documentation>
168
<xs:attribute name="Id" type="xs:string">
170
<xs:documentation>ID of the log file specification.</xs:documentation>
173
<xs:attribute name="Name" type="xs:string">
175
<xs:documentation>Specifies the logical name for the log file.</xs:documentation>
178
<xs:attribute name="Filename" type="xs:string">
180
<xs:documentation>Specifies the operating-system file name for the log file.</xs:documentation>
183
<xs:attribute name="Size" type="xs:string">
186
Specifies the size of the log file. The GB, MB and KB suffixes can be used to specify gigabytes,
187
megabytes or kilobytes. The default is megabytes if no suffix is specified. When a Size is not
188
supplied for a log file, SQL Server makes the file 1 MB.
192
<xs:attribute name="MaxSize" type="xs:string">
195
Specifies the maximum size to which the log file can grow. The GB, MB and KB suffixes can be used to
196
to specify gigabytes, megabytes or kilobytes. The default is megabytes if no suffix is specified. If
197
MaxSize is not specified, the file will grow until the disk is full.
201
<xs:attribute name="GrowthSize" type="xs:string">
204
Specifies the growth increment of the log file. The GB, MB and KB and % suffixes can be used to
205
specify gigabytes, megabytes, kilobytes or a percentage of the current file size to grow. The default is
206
megabytes if no suffix is specified. The default value is 10% if GrowthSize is not specified, and the
207
minimum value is 64 KB. The GrowthSize setting for a file cannot exceed the MaxSize setting.
214
<xs:element name="SqlScript">
217
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Component" />
219
<xs:documentation>SQL Script</xs:documentation>
222
<xs:attribute name="Id" use="required" type="xs:string"/>
223
<xs:attribute name="SqlDb" type="xs:string">
225
<xs:documentation>required when not child of SqlDatabase</xs:documentation>
228
<xs:attribute name="User" type="xs:string">
230
<xs:attribute name="BinaryKey" type="xs:string" use="required">
232
<xs:documentation>Reference to Binary stream that contains the SQL script to execute.</xs:documentation>
235
<xs:attribute name="ExecuteOnInstall" type="YesNoType">
237
<xs:documentation>Specifies to execute the script when the associated component is installed. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
240
<xs:attribute name="ExecuteOnReinstall" type="YesNoType">
242
<xs:documentation>Specifies whether to execute the script when the associated component is reinstalled. Setting ExecuteOnInstall to yes does <html:b>not</html:b> imply ExecuteOnReinstall is set to yes. ExecuteOnReinstall must be set in addition to ExecuteOnInstall for it to be executed during both install and reinstall. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
245
<xs:attribute name="ExecuteOnUninstall" type="YesNoType">
247
<xs:documentation>Specifies to execute the script when the associated component is uninstalled. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
250
<xs:attribute name="RollbackOnInstall" type="YesNoType">
252
<xs:documentation>Specifies whether to execute the script on rollback if an attempt is made to install the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
255
<xs:attribute name="RollbackOnReinstall" type="YesNoType">
257
<xs:documentation>Specifies whether to execute the script on rollback if an attempt is made to reinstall the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
260
<xs:attribute name="RollbackOnUninstall" type="YesNoType">
262
<xs:documentation>Specifies whether to execute the script on rollback if an attempt is made to uninstall the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
265
<xs:attribute name="ContinueOnError" type="YesNoType">
267
<xs:documentation>Continue executing scripts even if this one fails.</xs:documentation>
270
<xs:attribute name="Sequence" type="xs:integer">
272
<xs:documentation>Specifes the order to run the SQL Scripts. It is recommended that rollback scripts be scheduled before their complementary execution script. This order is also relative across the SqlString element.</xs:documentation>
278
<xs:element name="SqlString">
281
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Component" />
283
<xs:documentation>SQL String</xs:documentation>
286
<xs:attribute name="Id" use="required" type="xs:string">
288
<xs:attribute name="SQL" use="required" type="xs:string">
290
<xs:attribute name="User" type="xs:string">
292
<xs:attribute name="SqlDb" type="xs:string">
294
<xs:attribute name="ExecuteOnInstall" type="YesNoType">
296
<xs:documentation>Specifies to execute the string when the associated component is installed. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
299
<xs:attribute name="ExecuteOnReinstall" type="YesNoType">
302
Specifies whether to execute the string when the associated component is reinstalled. Setting ExecuteOnInstall to yes does <html:b>not</html:b> imply ExecuteOnReinstall is set to yes. ExecuteOnReinstall must be set in addition to ExecuteOnInstall for it to be executed during both install and reinstall. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.
306
<xs:attribute name="ExecuteOnUninstall" type="YesNoType">
308
<xs:documentation>Specifies to execute the string when the associated component is uninstalled. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
311
<xs:attribute name="RollbackOnInstall" type="YesNoType">
313
<xs:documentation>Specifies whether to execute the string on rollback if an attempt is made to install the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
316
<xs:attribute name="RollbackOnReinstall" type="YesNoType">
318
<xs:documentation>Specifies whether to execute the string on rollback if an attempt is made to reinstall the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
321
<xs:attribute name="RollbackOnUninstall" type="YesNoType">
323
<xs:documentation>Specifies whether to execute the string on rollback if an attempt is made to uninstall the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
326
<xs:attribute name="ContinueOnError" type="YesNoType">
328
<xs:documentation>Continue executing strings even if this one fails.</xs:documentation>
331
<xs:attribute name="Sequence" type="xs:integer">
333
<xs:documentation>Specifes the order to run the SQL Strings. It is recommended that rollback strings be scheduled before their complementary execution string. This order is also relative across the SqlScript element.</xs:documentation>
339
<xs:simpleType name="YesNoType">
341
<xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
343
<xs:restriction base='xs:NMTOKEN'>
344
<xs:enumeration value="no"/>
345
<xs:enumeration value="yes"/>