How do I log/trace Oracle stored procedure calls with parameter values?

后端 未结 4 1573
不思量自难忘°
不思量自难忘° 2020-12-19 14:10

We\'re looking for a way to log any call to stored procedures in Oracle, and see what parameter values were used for the call.

We\'re using Oracle 10.2.0.1

W

4条回答
  •  感情败类
    2020-12-19 15:00

    Yes, I think I should have used the term 'trace'

    I'll try to describe what we've done:

    Using the enterprise manager (as dbo) we've gone to a session, and started a trace

    start trace Enable wait info, bind info

    Run an operation on our application that hits the DB

    Finish the trace, run this on the output:

    tkprof .prc output2.txt sys=no record=record.txt explain=dbo@DBINST/PW

    What we're wanting to see is, "these procedures were called with these parameters" What we're getting is:

    Begin dbo.UPKG_PACKAGENAME.PROC(:v0, :v1, :v2 ...); End;
    /
    Begin dbo.UPKG_PACKAGENAME.PROC2(:v0, :v1, :v2 ...); End;
    /
    ...
    

    So we can trace the procedures that were called, but we don't get the actual parameter values, just the :v0, etc.

    My understanding is that what we've done is the same as the alter system statement, but please let us know if that's not the case.

    Thanks

提交回复
热议问题