DROP CREDENTIAL (Transact-SQL)
Applies to: SQL Server Azure SQL Managed Instance
Removes a credential from the server.
Transact-SQL syntax conventions
Syntax
DROP CREDENTIAL credential_name
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
Arguments
credential_name
Is the name of the credential to remove from the server.
Remarks
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).
Permissions
Requires ALTER ANY CREDENTIAL permission. If dropping a system credential, requires CONTROL SERVER permission.
Examples
The following example removes the credential called Saddles
.
DROP CREDENTIAL Saddles;
GO
See Also
Credentials (Database Engine)
CREATE CREDENTIAL (Transact-SQL)
ALTER CREDENTIAL (Transact-SQL)
DROP DATABASE SCOPED CREDENTIAL (Transact-SQL)
sys.credentials (Transact-SQL)
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho