Hitachi

Hitachi Advanced Database SQL Reference


3.2.1 Specification format and rules for the ALTER USER statement

Change the following information for an HADB user:

Organization of this subsection

(1) Specification format

ALTER-USER-statement ::= ALTER USER authorization-identifier IDENTIFIED BY new-password

(2) Explanation of specification format

[Figure] authorization-identifier

Specify the authorization identifier of the HADB user whose user information is to be changed.

For rules about specifying authorization identifiers, see 6.1.4 Specifying names.

[Figure] IDENTIFIED BY new-password

Specify the new password.

The rules for specifying the password are as follows:

  • The password can include single-byte uppercase and lowercase letters, numbers, backslashes (\), as well as the following characters:

    @ ` ! " # $ % & ' ( ) * : + ; [ ] { } , = < > | - . ^ ~ / ? _

  • Specify the password in the form of a character string literal. Therefore, you must enclose the password in single quotation marks. The following are examples:

    Example 1: Set the new password to Password01

    IDENTIFIED BY 'Password01'

    Example 2: Set the new password to Pass'01

    IDENTIFIED BY 'Pass''01'

    If the password itself includes a single quotation mark ('), specify two single quotation marks ('') to represent the single quotation mark ('), as shown in the example above.

    For rules on specifying a character string literal, see Table 6‒10: Description formats and assumed data types of literals.

  • The password cannot be empty. That is, the following is not permitted:

    IDENTIFIED BY ''

  • The password cannot exceed 255 characters (255 bytes).

Note
  • If you are using the JDBC driver, we recommend that you not use the following character in the password:

    &

  • If you are using the ODBC driver, we recommend that you not use the following characters in the password:

    [ ] { } ( ) , ; ? * = ! @

(3) Privileges required at execution

To execute the ALTER USER statement, the CONNECT privilege is required.

(4) Rules

  1. An HADB user with the DBA privilege can change the user information of every HADB user. However, the user information of HADB users with the audit privilege cannot be changed. The user information of an HADB user with the audit privilege can be changed by that HADB user only.

  2. An HADB user without the DBA privilege can change the user information of only the current user (the HADB user whose authorization identifier is currently connected to the HADB server).

(5) Examples

Example

Change the password of HADB user ADBUSER01 to #HelloHADB_02.

ALTER USER "ADBUSER01" IDENTIFIED BY '#HelloHADB_02'