Database Element (ICF)
Contains elements that configure the instance database.
語法
<NotificationServicesInstance>
...
<Database>
Element Characteristics
Characteristic | Description |
---|---|
Data type |
None |
Default value |
None |
Occurrence |
Optional once per NotificationServicesInstance element |
Updates |
Cannot be added or deleted after creating the instance |
Element Relationships
Relationship | Elements |
---|---|
Parent element |
|
Child elements |
備註
If the instance configuration file (ICF) does not contain a Database element, Notification Services uses the model database as a template when creating an instance database.
The specifications for each application database are contained in each application definition file (ADF).
If you want to alter the database after creating the instance, use the SQL Server tools, such as SQL Server Management Studio.
範例
This example shows a complete Database element. The %BaseDirectoryPath% value can be passed in from the command line or can be specified in the ParameterDefaults element of the configuration file.
<Database>
<DatabaseName>StockInstance</DatabaseName>
<SchemaName>Stock</SchemaName>
<NamedFileGroup>
<FileGroupName>Primary</FileGroupName>
<FileSpec>
<LogicalName>PrimaryFG</LogicalName>
<FileName>%BaseDirectoryPath%\Primary.mdf</FileName>
<Size>10MB</Size>
<MaxSize>20MB</MaxSize>
<GrowthIncrement>20%</GrowthIncrement>
</FileSpec>
</NamedFileGroup>
<NamedFileGroup>
<FileGroupName>Stock</FileGroupName>
<FileSpec>
<LogicalName>StockFG</LogicalName>
<FileName>%BaseDirectoryPath%\Stock.mdf</FileName>
<Size>20MB</Size>
<MaxSize>40MB</MaxSize>
<GrowthIncrement>20%</GrowthIncrement>
</FileSpec>
</NamedFileGroup>
<LogFile>
<LogicalName>StockLog</LogicalName>
<FileName>%BaseDirectoryPath%\Stock.ldf</FileName>
<Size>5MB</Size>
<MaxSize>10MB</MaxSize>
<GrowthIncrement>20%</GrowthIncrement>
</LogFile>
<DefaultFileGroup>Stock</DefaultFileGroup>
<CollationName>SQL_Latin1_General_CP1251_CI_AS</CollationName>
</Database>
請參閱
參考
Application Definition File Reference
概念
Instance Configuration File Reference
其他資源
model 資料庫
ALTER DATABASE (Transact-SQL)