Grant Debugging Privileges Dialog

The Grant Debugging Privileges Dialog provides an easy way to grant the necessary privileges to a user so that PL/SQL Debugging is possible.

As indicated in PL/SQL Debugging Setup, there are privileges that must be granted by SYSDBA to a user before PL/SQL debugging is possible. For example, in Oracle Database 10g Release 1 (10.1) or later, both DEBUG CONNECT SESSION and DEBUG ANY PROCEDURE must be granted.

In Oracle Database 12.1 or later, additional privileges granting explicit access to an IP address and port range are also required to debug PL/SQL. These privileges are granted using the DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE package procedure. To grant privileges on multiple port ranges for the same IP, run this dialog multiple times and provide different port ranges each time. All port range privileges granted from previous executions of this dialog will remain in effect.

See Also

PL/SQL Debugging Setup

Starting the Grant Debugging Privileges Dialog

To open the Grant Debugging Privileges Dialog, connect in Server Explorer as SYSDBA to the database where the PL/SQL that you wish to debug is located. Next, locate the User Node or Schema Node representing the user who needs to be granted the privileges. From the context menu of the node, select Grant Debugging Privileges. This context menu item is visible only in a SYSDBA connection.

The Grant Debugging Privileges Dialog appears as follows:

Using the Grant Debugging Privileges Dialog

The Grant Debugging Privileges Dialog has the following controls:

Control Description

IP Address

Specify the IP address for the computer where Visual Studio is installed. This control is only visible when connected to Oracle Database 12.1 or later. For more information, see PL/SQL Debugging Options.

Starting Port Number

Specify the starting port number in the range of port numbers for the computer where Visual Studio is installed. This control is only visible when connected to Oracle Database 12.1 or later. For more information, see PL/SQL Debugging Options.

Ending Port Number

Specify the ending port number in the range of port numbers for the computer where Visual Studio is installed. This control is only visible when connected to Oracle Database 12.1 or later. For more information, see PL/SQL Debugging Options.

Preview SQL button

Displays the SQL statements to be executed by this dialog.

OK

Runs the SQL statements to grant the debugging privileges.

Cancel

Closes the dialog and does not execute any SQL statements.

Help

Launches this help page.

Revoking Privileges

The privileges granted by this dialog may be revoked by using the Grant/Revoke Privileges Dialog and for Oracle Database 12.1 or later also executing the DBMS_NETWORK_ACL_ADMIN.REMOVE_HOST_ACE package procedure as SYSDBA.

For example,

BEGIN
   DBMS_NETWORK_ACL_ADMIN.REMOVE_HOST_ACE(
     HOST => '255.255.255.25',
     LOWER_PORT => 61000,
     UPPER_PORT => 65000,
     ACE => XS$ACE_TYPE(PRIVILEGE_LIST => XS$NAME_LIST('jdwp'),
                        PRINCIPAL_NAME => 'HR',
                        PRINCIPAL_TYPE => XS_ACL.PTYPE_DB));
 END;

Replace the host, lower port, upper port, and principal name with the values provided in earlier calls to the Grant/Revoke Privileges Dialog.