How to use SQL statements to delete sqlserver Registration

Source: Internet
Author: User

Sp_dropserver [@ Server =] 'server'
[, [@ Droplogins =] {'droplogins' | null}]

Parameters
[@ Server =] 'server'

The server to be deleted. The data type of the server is sysname, with no default value. The server must already exist.

[@ Droplogins =] 'droplogins' | null

Specify that if droplogins is specified, the related remote and linked server logon for the server will also be deleted. @ Droplogins the data type is Char (10) with the default value null.

Return code value
0 (successful) or 1 (failed)

Note
If a server has related remote and linked server logon entries, when running sp_dropserver on the server, an error message is returned. This message indicates that before deleting a remote or linked server, you must first delete the related logon. When deleting a server, use the droplogins parameter to delete all remote and linked server logins.

Sp_dropserver cannot be executed in a user-defined transaction.

Permission
Only members of the SysAdmin or setupadmin fixed server role can execute sp_dropserver.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.