The RegisteredServer object exposes the attributes of a single registry-listed server running Microsoft® SQL Server™.
SQL-DMO applications can maintain lists of some or all of the SQL Server installations in an organization in the registry of a Microsoft Windows NT® or Microsoft Windows® 95 system. The lists establish categories for the servers running SQL Server.
For example, to group and view servers by division in a SQL-DMO application, SQL-DMO would represent each division as a ServerGroup object. The division’s ServerGroup name is maintained by SQL-DMO as a Windows NT or Windows 95 registry key. Within this registry entry, separate keys list each SQL Server installation in the division. The list of these keys forms the members of the SQL-DMO RegisteredServers collection while each key’s data is exposed by a RegisteredServer object.
With the RegisteredServer object, you can:
The Name property of the RegisteredServer object refers to the SQL Server name registered. SQL-DMO does not attempt to validate the Name property value when registering a server running SQL Server. The RegisteredServer object Name property is validated when the object is used in an attempt to connect to the SQL Server installation.
After a server running SQL Server is registered, SQL-DMO uses the properties of the registered server when connecting and when attempting to reconnect after a connection failure. For example, SQL-DMO ignores the szLogin and szPassword parameters of the Connect method of the SQLServer object when that object references a SQL Server installation registered to use Windows NT Authentication Mode.
To create a registry entry listing a SQL Server installation
| Login Property | SaLogin Property |
| Name Property | UseTrustedConnection Property |
| Password Property | VersionMajor Property |
| PersistFlags Property | VersionMinor Property |