Database Element (ADF)
Contains elements that define the application database.
Syntax
<Application>
...
<Database>
Element Characteristics
Characteristic | Description |
---|---|
Data type |
None. |
Default value |
None. |
Occurrence |
Optional once per Application element. |
Updates |
Cannot be added or deleted when updating the application |
Element Relationships
Relationship | Elements |
---|---|
Parent element |
|
Child elements |
Hinweise
If the Database element and its child elements are not specified, Microsoft SQL Server Notification Services creates an application database using the default settings for the instance of SQL Server.
Beispiel
The following example shows how to specify database settings in an ADF for an application that has two named filegroups, Primary
and Secondary
, and a log file named StockLog
. It uses the Secondary
filegroup as its default filegroup, and uses the SQL_Latin1_General_Cp437_BIN collation.
<Database>
<NamedFileGroup>
<FileGroupName>Primary</FileGroupName>
<FileSpec>
<LogicalName>StockPrimary</LogicalName>
<FileName>C:\SQLData\StockPrimary.mdf</FileName>
<Size>2GB</Size>
<MaxSize>5GB</MaxSize>
<GrowthIncrement>500MB</GrowthIncrement>
</FileSpec>
</NamedFileGroup>
<NamedFileGroup>
<FileGroupName>Secondary</FileGroupName>
<FileSpec>
<LogicalName>StockSecondary1</LogicalName>
<FileName>D:\Data\StockSecondary1.ndf</FileName>
<Size>1000MB</Size>
<MaxSize>5000MB</MaxSize>
<GrowthIncrement>25%</GrowthIncrement>
</FileSpec>
<FileSpec>
<LogicalName>StockSecondary2</LogicalName>
<FileName>D:\Data\StockSecondary2.ndf</FileName>
</FileSpec>
</NamedFileGroup>
<LogFile>
<LogicalName>StockLog</LogicalName>
<FileName>E:\Logs\StockLog.ldf</FileName>
</LogFile>
<DefaultFileGroup>Secondary</DefaultFileGroup>
<CollationName>SQL_Latin1_General_Cp437_BIN</CollationName>
</Database>
Siehe auch
Andere Ressourcen
Definieren der Anwendungsdatenbank
CREATE DATABASE (Transact-SQL)