Instance.SchemaName Property

Gets or sets the database schema for all instance database objects.

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Синтаксис

'Декларация
Public Property SchemaName As String
public string SchemaName { get; set; }
public:
property String^ SchemaName {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_SchemaName ()

/** @property */
public void set_SchemaName (String value)
public function get SchemaName () : String

public function set SchemaName (value : String)

Значение свойства

A String, between 1 and 128 characters in length, that specifies the schema name.

Замечания

In Microsoft SQL Server 2005 Notification Services, you can specify the DatabaseName. Because you can deploy multiple instances and applications to the same database, you must specify a different schema name for each instance and application. This allows database objects of multiple instances and applications to be isolated and prevents collisions across instances and applications.

All instance database objects are created in the specified schema.

If you do not specify the database name and schema name, Notification Services creates a new database with the name instanceNameNSMain, and creates all instance objects in the dbo schema.

For more information about database schemas, see Отделение пользователей от схем.

Пример

The following examples show how to specify a name for the instance database and a schema for instance objects:

myInstance.DatabaseName = "MyInstNSMain";
myInstance.SchemaName = "MyInstSchema";
myInstance.DatabaseName = "MyInstNSMain"
myInstance.SchemaName = "MyInstSchema"

Синхронизация потоков

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

Instance Class
Instance Members
Microsoft.SqlServer.Management.Nmo Namespace

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

Настройка экземпляров служб Notification Services
SchemaName Element (ICF)