SET SESSION AUTHORIZATION statement (Change connected user)

Function

The SET SESSION AUTHORIZATION statement posts an authorization identifier and a password to HiRDB to make a change in the users who are connected.

Privileges

Users with the DBA or CONNECT privilege

These users can change connected users.

Format

SET SESSION AUTHORIZATION {:embedded variable-1|?-parameter-1}
   [{USING|IDENTIFIED BY} {: embedded variable-2|?-parameter-2 }]

Operands

Specifies an embedded variable or ? parameter that has an authorization identifier as its value.

If the UAP is written in C, specify a fixed-length character string of up to 31 bytes, the final character of which is the null value. If the character string does not terminate with the null value, the character string occupying (area length - 1) is used as the authorization identifier.

If the UAP is written in COBOL, specify a fixed-length character string of up to 30 bytes; this character string need not terminate with the null value.

If the character strings are to be case sensitive, enclose them in quotation marks (").

Specifies an embedded variable or ? parameter that contains a password as its value.

If the UAP is written in C, specify a fixed-length character string of up to 31 bytes, the final character of which is the null value. If the character string does not terminate with the null value, the character string occupying (area length - 1) is used as the password.

If the UAP is written in COBOL, specify a fixed-length character string of up to 30 bytes; this character string need not terminate with the null value.

Common rules

  1. The user can be changed only if the statement is executed before the transaction is started or it is executed first in the transaction.
  2. All results preprocessed by the PREPARE statement are nullified.
  3. The user cannot be changed if a holdable cursor is open.
  4. The user cannot be changed if a lock specified with UNTIL DISCONNECT is applied by a LOCK TABLE statement.
  5. When specifying SET SESSION AUTHORIZATION in an X/Open compliant UAP running under OLTP, specify this statement so that it is executed immediately after a tx_begin or xa_begin function call.
  6. If SET SESSION AUTHORIZATION of the dynamic SQL statement is executed, the statement is committed upon completion of the processing.
  7. The user cannot be changed if connection is to a distributed RD-node.