Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Technical Reference
 sp_dropserver (Transact-SQL)
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
SQL Server 2008 Books Online (November 2009)
sp_dropserver (Transact-SQL)

Removes a server from the list of known remote and linked servers on the local instance of SQL Server.

Topic link icon Transact-SQL Syntax Conventions

sp_dropserver [ @server = ] 'server' 
     [ , [ @droplogins = ] { 'droplogins' | NULL} ]
[ @server = ] 'server'

Is the server to be removed. server is sysname, with no default. server must exist.

[ @droplogins = ] 'droplogins' | NULL

Indicates that related remote and linked server logins for server must also be removed if droplogins is specified. @droplogins is char(10), with a default of NULL.

0 (success) or 1 (failure)

If you run sp_dropserver on a server that has associated remote and linked server login entries, or is configured as a replication publisher, an error message is returned. To remove all remote and linked server logins for a server when you remove the server, use the droplogins argument.

sp_dropserver cannot be executed inside a user-defined transaction.

Requires ALTER ANY LINKED SERVER permission on the server.

The following example removes the remote server ACCOUNTS and all associated remote logins from the local instance of SQL Server.

sp_dropserver 'ACCOUNTS', 'droplogins';
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker