Share via


RegisteredServers Collection

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The RegisteredServers collection contains RegisteredServer objects that expose the attributes of a single registry-listed instance of Microsoft SQL Server.

현재 개체를 보여 주는 SQL-DMO 개체 모델

Properties

주의

SQL Distributed Management Objects (SQL-DMO) applications can maintain lists of some or all of instances of SQL Server in an organization. The lists are stored in the registry of the operating system.

With the RegisteredServers collection, you can:

  • Create a Windows registry entry that lists an instance of SQL Server by SQL Server name.

  • Remove a Windows registry entry listing an instance of SQL Server.

For more information about creating registry entries that organize instances of SQL Server, see the RegisteredServer Objectsection.

To remove a registry entry that lists an instance of SQL Server

  • Use the Remove method of the RegisteredServers collection, as in:

    oApplication.RegisteredServers.Remove("SEATTLE1")
    

When using the Item or Remove method, the RegisteredServers collection supports member identification using either name or ordinal reference syntax. For example:

Set oRegisteredServer = oApplication.RegisteredServers("LONDON2")

Or:

Set oRegisteredServer = oApplication.RegisteredServers(2)