The INITIALIZE function initializes the target session for debugging.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.
Syntax
DBMS_DEBUG.INITIALIZE (
debug_session_id IN VARCHAR2 := NULL,
diagnostics IN BINARY_INTEGER := 0)
RETURN VARCHAR2;
Parameters
| Parameter | Description |
|---|---|
| debug_session_id | The ID of the target session. A unique ID is generated if the value of this parameter is NULL. |
| diagnostics | Specifies whether to dump the output of diagnostic to the trace file. Valid values:
|
Note
Only the default value is supported. An error is reported if a non-default value is passed.
Return values
The ID of the newly registered debugging session.
Usage notes
The caller or the specified debug role must have the
DEBUG CONNECT SESSIONprivilegebefore their calls to
DBMS_DEBUGcan succeed, otherwise, an error is reported. Other exceptions are possible if: a debug role is specified but the password is invalid; the caller is not granted the role; or the role is application-enabled but the call does not come from the role-enabling package.The
CREATE ANY PROCEDUREprivilege does not affect the visibility of routines through the debugger. ADEBUGprivilege with a correspondingDEBUG ANY PROCEDUREvariant is introduced for each object. These are required if you want to see routines of users other than the session's logon user.The authentication of the debug role and the check for
DEBUG CONNECT SESSIONprivilege are performed in the context of the caller to this routine. If the caller is a definer's rights routine or is called from one, only privileges granted to the defining user, the debug role, orPUBLICare used to check forDEBUG CONNECT SESSION. If this call is made from a definer's rights routine, the debug role, if specified, must be the one that is granted to the definer, but it does not need to have been granted to the session logon user or be enabled in the calling session at the time of the call.The checks that the debugger makes after this call to look for the DEBUG privilege on individual procedures are performed in the context of the session's logon user, the roles that were enabled on the session level when the call was made, even if those roles were unavailable within a definer's rights environment of the call, and the debug role.