Search This Blog

Showing posts with label Linked Server. Show all posts
Showing posts with label Linked Server. Show all posts

Tuesday, July 22, 2008

Test the connection to a Linked Server

Procedure: SP_TESTLINKEDSERVER

Syntax:
sp_testlinkedserver @servername = servername

@Servername: Linked servername

Note: Caller must have appropriate login mapping.

e.g.
Exec sp_testlinkedserver SQL1

Get List of Linked Servers on Curent/Local Server

Procedure: SP_LINKEDSERVERS

Description: Returns the list of linked servers defined in the local server.

It returns:
Column name - Description
SRV_NAME - Name of the linked server.
SRV_PROVIDERNAME - Friendly name of the OLE DB provider managing access to the specified linked server.
SRV_PRODUCT - Product name of the linked server.
SRV_DATASOURCE - OLE DB data source property corresponding to the specified linked server.
SRV_PROVIDERSTRING - OLE DB provider string property corresponding to the linked server.
SRV_LOCATION - OLE DB location property corresponding to the specified linked server.
SRV_CAT - OLE DB catalog property corresponding to the specified linked server.