The RemoteServers collection contains RemoteServer objects exposing the attributes of a Microsoft® SQL Server™ installation that is visible as a remote server.
SQL Server provides several mechanisms facilitating connections between SQL Server installations in an organization. One mechanism is remote-server naming.
A SQL Server installation can maintain authentication information for connections originating from other SQL Server installations. Each SQL Server installation in an organization can control access by listing the SQL Server installations from which it accepts connections.
Additionally, when a remote server is named at a SQL Server installation, the server maintaining the name list can, in turn, originate a connection to a named remote server.
Note Remote server naming is one method for configuring server-initiated access for SQL Server installations in an organization. SQL Server version 7.0 implements distributed queries using persisted OLE DB data source definitions called linked servers. For more information, see LinkedServer Object.
With the RemoteServers collection, you can:
To identify a SQL Server installation as a remote server
To remove a named remote server, disabling access to or from the installation
oSQLServer.RemoteServers.Remove("LONDON1")
To rename a SQL Server installation
When using the Item or Remove method, the RemoteServers collection supports member identification using either name or ordinal reference syntax. For example:
Set oRemoteServer = oSQLServer.RemoteServers("SEATTLE2")
Or:
Set oRemoteServer = oSQLServer.RemoteServers(2)
Note Creating or removing remote server entries by using the RemoteServers collection requires appropriate privilege. The SQL Server login used for SQLServer object connection must be a member of the fixed role setupadmin or a role with greater privilege.
Add Method | Refresh Method |
Item Method | Remove Method (Collections) |
ItemByID Method |