Collection Contents Index SET SQLCA statement [ESQL] SIGNAL statement pdf/chap9.pdf

Reference Manual
   CHAPTER 9. SQL Statements     

SETUSER statement


Function 

To allow a database administrator to impersonate another user, and to enable connection pooling.

Syntax 

{ SET SESSION AUTHORIZATION | SETUSER }
[ [ WITH OPTIONS ] userid ]

Parameters 

userid: The user ID to be impersonated

Permissions 

Must have DBA authority.

See also 

EXECUTE IMMEDIATE statement

GRANT statement

REVOKE statement

SET OPTION statement

Description 

The SETUSER statement is provided to make database administration easier. It enables a user with DBA authority to impersonate another user of the database.

Also, you can use SETUSER from an application server to take advantage of connection pooling. This cuts down the number of distinct connections that need to be made, and so helps performance.

If WITH OPTIONS is specified, the database options in effect are changed to the current database options of userid. By default, only permissions (including group membership) are altered.

SETUSER with no user ID undoes all earlier SETUSER statements. It returns the active user ID to that of the original connection.

There are several uses for the SETUSER statement, including the following:

Standards and compatibility 

Examples 


Collection Contents Index SET SQLCA statement [ESQL] SIGNAL statement pdf/chap9.pdf