Getting "ORA-01031: insufficient privileges" when debugging with a proxy user. The proxy user connects as a user that can debug.
To reproduce the problem please create a proxy user with your user(or any user which can debug) . For example:
create user zproxy identified by zproxy;
grant connect to zproxy;
alter user myUser grant connect through zproxy;
Then connect with the proxy user (in my case it would be :User ZPROXY[myUser ] password zproxy)
Go to the schema browser and select a procedure to debug .If you do not have one you can create this one:
CREATE OR REPLACE PROCEDURE test_var
AS
var varchar(10);
BEGIN
SELECT 'test' INTO var FROM DUAL;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
/
Select the procedure, r-click and select compile with debug.
Double click to open it in the editor , r click and select execute|execute PL/SQL debugger.
You get the error:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.PBSDE", line 78
ORA-06512: at "SYS.DBMS_DEBUG", line 226
ORA-06512: at line 4
WORKAROUND
Add debug any procedure, debug connect session, execute procedure and select of the necessary tables to the proxy user
STATUS
Waiting for fix in a future release of Toad for Oracle