ORA-01031: Insufficient Privileges trying to execute SQL in debug session

MarcusRangel

Member²
Hello,

We have recently upgraded to the latest PL/SQL Developer version and one of the new features is giving us a hard time. As you can see in the screenshots, the attempt to execute SQL in a debug session is crashing because some privilege is missing. The user has "debug any procedure" and "debug connect session". I found the code below in an old post here, and it also runs normally. The problem happens in both 11g and 12c. If I grant DBA to the user, it works. What are we missing?

declare
debug_session_id varchar2(100);
begin
debug_session_id := sys.dbms_debug.initialize;
sys.dbms_debug.debug_on;
end;

image1.png

image2.png

 
Does your Oracle user have the system privilege to create a temporary table? This is a requirement when transferring a result set from the debugger.
 
Well, that was it, but with a twist.

Our developers have that privilege, but there's also for their convenience a DDL trigger that switches their CURRENT_SCHEMA to the owner of the objects.The debug windows is trying to create the temporary table in that schema.

We'll just do some workaround here, thanks for the support.
 
Back
Top