Sunday, August 12, 2012

Visual Studio Server Explorer Oracle Procedure Run Debug Error

When try to debug an oracle procedure/package  from visual studio server explorer an error shows to inform the user that he has insufficient privilege for debugging as below.

Visual Studio Server Explorer Oracle Procedure Run Debug Error
---------------------------
Microsoft Visual Studio
---------------------------
Server Explorer
An error occurred while executing the procedure/function: ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
---------------------------
OK
---------------------------

Solution
The following privileges are required for debugger:

1. DEBUG CONNECT SESSION
Connect the current session to a debugger that uses the Java Debug Wire Protocol (JDWP).

2.DEBUG ANY PROCEDURE
Debug all PL/SQL and Java code in any database object. Granting this privilege is equivalent to granting the DEBUG object privilege on all applicable objects in the database.

Syntax
GRANT DEBUG CONNECT SESSION TO user_name ;
GRANT DEBUG ANY PROCEDURE TO user_name;

No comments: