| title | DROP CREDENTIAL (Transact-SQL) | Microsoft Docs | ||||||
|---|---|---|---|---|---|---|---|
| ms.custom | |||||||
| ms.date | 08/19/2015 | ||||||
| ms.prod | sql-non-specified | ||||||
| ms.reviewer | |||||||
| ms.suite | |||||||
| ms.technology |
|
||||||
| ms.tgt_pltfrm | |||||||
| ms.topic | language-reference | ||||||
| f1_keywords |
|
||||||
| dev_langs |
|
||||||
| helpviewer_keywords |
|
||||||
| ms.assetid | df22c826-317d-45a6-b078-186acb65f71e | ||||||
| caps.latest.revision | 31 | ||||||
| author | BYHAM | ||||||
| ms.author | rickbyh | ||||||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]
Removes a credential from the server.
Transact-SQL Syntax Conventions
DROP CREDENTIAL credential_name
credential_name
Is the name of the credential to remove from the server.
To drop the secret associated with a credential without dropping the credential itself, use ALTER CREDENTIAL.
Information about credentials is visible in the sys.credentials catalog view.
Warning
Proxies are associated with a credential. Deleting a credential that is used by a proxy leaves the associated proxy in an unusable state. When dropping a credential used by a proxy, delete the proxy (by using sp_delete_proxy (Transact-SQL) and recreate the associated proxy by using sp_add_proxy (Transact-SQL).
Requires ALTER ANY CREDENTIAL permission. If dropping a system credential, requires CONTROL SERVER permission.
The following example removes the credential called Saddles.
DROP CREDENTIAL Saddles;
GO
Credentials (Database Engine)
CREATE CREDENTIAL (Transact-SQL)
ALTER CREDENTIAL (Transact-SQL)
DROP DATABASE SCOPED CREDENTIAL (Transact-SQL)
sys.credentials (Transact-SQL)