Udostępnij za pośrednictwem


sp_testlinkedserver (Transact-SQL)

Tests the connection to a linked server.

Topic link iconTransact-SQL Syntax Conventions

Syntax

sp_testlinkedserver [ @servername ] = servername

Arguments

  • [ @servername = ] servername
    Is the name of the linked server. servername is sysname, with no default value.

Result Sets

None

Permissions

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

Return Code Value

0 (success) or 1 (failure)

Examples

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

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

See Also

Reference

sp_addlinkedserver (Transact-SQL)
sp_addlinkedsrvlogin (Transact-SQL)

Other Resources

Configuring Linked Servers for Delegation

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

14 April 2006

New content:
  • Added the Examples section.