Thursday, June 11, 2009

Oracle - Enabling Debugging for Store Procedures

The other day I was trying to debug a stored procedure in Oracle (using PL SQL Developer tool) and was greeted with the following error when I tried debugging:




[Error: ORA-0131: Insufficient privileges]


As the error says, the user id that I was using doesn't have debug permissions. To resolve this:
  • Goto command prompt (Start -> run -> cmd)
  • Hit command 'sqlplus'
  • Then connect to db as system admin using conn system/@;
  • You can then use grant debug connect session to ; to grant user the debug permission.
  • From PL SQL Developer tool, right click on the package and select 'Add debug information'.
  • Start debugging (hit F9).

No comments: