Jaa


Defining the Instance Database

When you configure an instance of Notification Services, you can define the instance database name, the schema for instance objects, and, if creating a new database, the specifications for the database. The instance database stores instance metadata and subscriber data.

Instance Databases

Each instance of Notification Services has instance metadata. This metadata includes the applications hosted by the instance, the protocols used by those applications, and delivery channels that use those delivery protocols.

Notification Services stores instance metadata in an instance database. Notification Services also stores subscriber and subscriber device data in the instance database so that the subscriber information can be shared by all applications hosted by the instance.

You can use an existing database for the instance database, or you can have Notification Services create a new database. If you have Notification Services create a new database, you should fully define the database properties, such as file names, sizes, and locations. If you do not define the instance database, Notification Services creates a new database for the instance using the model database as a template. Unless you have customized the model database, these database settings might not provide the best performance for your instance.

Note

If you use an existing database, you only need to define the database name and schema name. If you specify other database properties, such as file names and file sizes, Notification Services ignores these unnecessary properties.

For recommendations about defining an instance database, see Database Considerations.

Using an Existing Database for Instance Data

Notification Services 2.0 always created a new database for instance data. In Notification Services, you can use any user database for instance data.

To use a specific database, you must specify the name of the database and specify a unique schema for all instance objects. When you create the instance, Notification Services will create the schema and create all instance tables, views, stored procedures, and other objects in that schema.

Because you can place multiple instances of Notification Services in the same database, using a unique schema for each instance separates objects of different instances and avoids name conflicts with other database objects.

If the specified database does not exist when you create the instance of Notification Services, Notification Services creates a new database.

To specify the database name

If you are configuring an instance of Notification Services through XML, specify the database name in the instance configuration file (ICF). If you are configuring an instance of Notification Services programmatically, use Notification Services Management Objects (NMO) to specify the database name.

To specify the schema name

If you are configuring an instance of Notification Services through XML, specify the schema name in the instance configuration file (ICF). If you are configuring an instance of Notification Services programmatically, use NMO to specify the schema name.

Creating a New Database for Instance Data

If you want Notification Services to create a new database for instance data, you can do any of the following:

  • Define the instance database. You can specify the database name, schema name, filegroups, log files, default filegroup, and collation. If the database does not exist, Notification Services creates a new database using the specified name and specified properties and creates all instance objects in the specified schema.
  • Specify only a database name and schema name. If the database does not exist, Notification Services creates a new database with the specified name, creates the specified schema, and creates all instance objects in the specified schema. Notification Services uses the model database as a template for the new database.
  • Specify no database properties. Notification Services creates a new instance database with the name instanceNameNSMain and creates all the instance objects in the dbo schema. Notification Services uses the model database as a template for the new database.

If you have Notification Services create a new database, you should fully define the database unless you want to use the model database as a template for the instance database.

To define the instance database

If you are configuring an instance of Notification Services through XML, define the instance database in the instance configuration file (ICF). If you are configuring an instance of Notification Services programmatically, use NMO to define the instance database.

See Also

Concepts

Specifying the Instance Name
Specifying the Database System Name
Associating Applications with an Instance
Defining Custom Delivery Protocols
Defining Delivery Channels
Configuring Argument Encryption
Specifying the Instance Version and History
Using Parameters in an Instance Configuration File
Database Considerations

Other Resources

Configuring Instances of Notification Services
Database Element (ICF)
Instance Configuration File Templates

Help and Information

Getting SQL Server 2005 Assistance