讓使用者擁有儲存過程的除錯許可權

shilei1發表於2011-05-06

許久以來,認為只要對使用者賦予grant debug any procedure許可權,使用者就擁有任何儲存過程及函式的除錯許可權,其實不然,並沒有達到想要的結果!讓使用者擁有儲存過程的除錯許可權,必須同時擁有下列許可權!

1)grant debug any procedure
2)grant debug connect session 


Privileges for Debugging PL/SQL and Java Stored Procedures

Starting with Oracle Database 10g, a new privilege model applies to debugging PL/SQL and Java code running within the database. This model applies whether you are using Oracle JDeveloper, Oracle Developer, or any of the various third-party PL/SQL or Java development environments, and it affects both the DBMS_DEBUG and DBMS_DEBUG_JDWP APIs.

For a session to connect to a debugger, the effective user at the time of the connect operation must have the DEBUG CONNECT SESSION system privilege. This effective user may be the owner of a definer's rights routine involved in making the connect call.

When a debugger becomes connected to a session, the session login user and the currently enabled session-level roles are fixed as the privilege environment for that debugging connection. Any DEBUG or EXECUTE privileges needed for debugging must be granted to that combination of user and roles.

To be able to display and change Java public variables or variables declared in a PL/SQL package specification, the debugging connection must be granted either EXECUTE or DEBUG privilege on the relevant code.

To be able to either display and change private variables or breakpoint and execute code lines step by step, the debugging connection must be granted DEBUG privilege on the relevant code

Caution:

The DEBUG privilege effectively allows a debugging session to do anything that the procedure being debugged could have done if that action had been included in its code.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-694583/,如需轉載,請註明出處,否則將追究法律責任。

相關文章