We have a certain SQL_ID that has performance issues (ex. cd123812jedjdu). This was shown from the AWR report to be called from PKG1. However, PKG1 calls so many packages inside, like below:
PKG1.MAIN
-> PKG1.PROC1
-> -> PKG2.PROC1
-> -> PKG2.PROC2
-> -> PKG2.PROC3
-> PKG1.PROC2
-> -> PKG3.PROC1
-> -> PKG3.PROC2
-> -> PKG3.PROC3
-> PKG1.PROC3
-> -> PKG4.PROC1
-> -> PKG4.PROC2
-> -> PKG4.PROC3
-> PKG1.PROC4
-> -> PKG5.PROC1
-> -> PKG5.PROC2
-> -> PKG5.PROC3
After hours of tracing, I found out it was being called from PKG4.PROC3
.
Is there any way I can find out the actual PL/SQL package that calls the SQL_ID, perhaps using the v$
views?
Note: I know the SQL_TEXT can be queries from v$
views, but there are multiple similar queries with the same SQL_TEXT.