ALTER CREDENTIAL#
Changes the identity and secret of an existing server-level credential.
Syntax#
Arguments#
credential_name
The name of the existing credential to change (at most 128 characters). Altering a credential that does not exist raises an error.
IDENTITY = ‘identity_name‘
The new identity. See CREATE CREDENTIAL for the reserved identity values.
SECRET = ‘secret‘
The new secret. Optional.
Remarks#
ALTER replaces both the identity and the secret. If SECRET is omitted, the stored secret is cleared (set to
NULL) — this matches SQL Server. The secret is protected at rest and is never shown in clear text.
Clearing the secret does not unbind the credential from its consumers: a consumer that matches the credential by
name still selects it, now without a key. A consumer whose authentication requires a secret — an AI provider
credential named by an endpoint URL, for example — then fails with an error naming the credential; always restate
SECRET when altering a credential that authenticates such calls. See
qua_add_external_ai_model.
Permissions#
Requires the connection-management permission (CreateConnection) on the server.
Examples#
Reset the identity and secret of AppCred:
ALTER CREDENTIAL AppCred
WITH IDENTITY = 'reporting_user2', SECRET = 'new-secret';