142.4.14 UPDATE_CREDENTIAL Procedure

The UPDATE_CREDENTIAL procedure updates credential values.

Syntax

DBMS_OBSERVABILITY.UPDATE_CREDENTIAL( credential_name IN VARCHAR2,
                                      attribute       IN VARCHAR2,
                                      value           IN VARCHAR2 );

Parameters

Table 142-19 UPDATE_CREDENTIAL Procedure Parameters

Parameter Description

credential_name

Specifies the name of the credential to update.

attribute

Name of the credential attribute to update. Valid values are:
  • username
  • password
  • token
  • comments

value

The new value for the specified attribute.

Exceptions

Table 142-20 UPDATE_CREDENTIAL Procedure Exceptions

Exception Description

ORA-20020

An attribute cannot be changed or the credential is an invalid DBMS_OBSERVABILITY credential.

Usage Notes

If you are updating a token-based credential, you can not specify a USERNAME or PASSWORD attribute. If you are updating a user-only or user-password credential, you can not specify a TOKEN attribute. The CREDENTIAL_NAME and TOKEN_TYPE attributes can not be updated.

Examples

The following example illustrates how to update the comments value for a specific credential:
SQL> execute dbms_observability.update_credential(
       credential_name => 'my_cred',
       attribute       => 'comments',
       value           => 'This is my credential for observability'
     );