This documentation is archived and is not being maintained.

sp_testlinkedserver (Transact-SQL)

Updated: 14 April 2006

Tests the connection to a linked server.

Topic link icon Transact-SQL Syntax Conventions

sp_testlinkedserver [ @servername ] = servername

[ @servername = ] servername

Is the name of the linked server. servername is sysname, with no default value.

No permissions are checked; however, the caller must have the appropriate login mapping.

0 (success) or 1 (failure)

The following example creates a linked server named SEATTLESales, and then tests the connection.

USE master;
EXEC sp_addlinkedserver 
    N'SQL Server';
sp_testlinkedserver SEATTLESales;

Release History

14 April 2006

New content:
  • Added the Examples section.