Поделиться через


DatabaseName Element (ADF)

Specifies the name of the application database.

Синтаксис

<Database>
    <DatabaseName>

Element Characteristics

Characteristic Description

Data type

string, between 1 and 128 characters in length.

Default value

The instance name + the application name, as defined in the instance configuration file (ICF).

Occurrence

Optional once per Database element.

Updates

Cannot be added, deleted, or modified when updating the instance.

Element Relationships

Relationship Elements

Parent element

Database Element (ADF)

Child elements

None.

Замечания

In SQL Server 2005 Notification Services, you can specify the name of the application database. This database can be a new or existing database. If the database already exists, Notification Services creates application database objects in the specified schema of the existing database. If the database does not exist, Notification Services creates a new database with the specified name and creates application database objects in the specified schema.

ms145379.note(ru-ru,SQL.90).gifВажно!
The specified database must be using 90 compatibility mode.

If you use the DatabaseName element, you should specify a unique schema name using the SchemaName element.

If you do not use the DatabaseName and SchemaName elements, Notification Services creates a new database with the name instanceName + applicationName, and creates all application database objects in the dbo schema. The instanceName and applicationName values are defined in the ICF.

When you delete an instance of Notification Services, Notification Services will delete the application database only if Notification Services created the database. Otherwise, Notification Services only deletes application objects from the database.

For more information about database names, see the database_name parameter in CREATE DATABASE (Transact-SQL).

Пример

The following example shows how to use the Stock database as the application database. If the Stock database exists, Notification Services uses the existing database. If the Stock database does not exist, Notification Services creates it.

<DatabaseName>Stock</DatabaseName>

См. также

Справочник

Application Definition File Reference

Основные понятия

Instance Configuration File Reference

Другие ресурсы

Определение базы данных приложений
CREATE DATABASE (Transact-SQL)

Справка и поддержка

Получение помощи по SQL Server 2005