For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.
I am looking to bring the select statement sql which I am running in the database to AWR report Is there any way to pin a sql to awr report
Raj Aru wrote:I am looking to bring the select statement sql which I am running in the database to AWR report Is there any way to pin a sql to awr report
Raj Aru wrote:
Yes, it's called coloring for some reason. Use dbms_workload_repository.add_colored_sql https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_WORKLOAD_REPOSITORY.html#GUID-243BBE24-DF37-45F…
Yes you can do that:
Oracle Performance and Backup Blog: How to color (mark) SQL for AWR snapshots
Regards,Adi
Thanks AndrewSayer for the quick help
A little add-on to the note about coloring - the statement won't necessarily appear in the standard AWR report because it may not have done enough work in any of the ordinary categories; however it will have been captured in the repository and you can report it in the "AWR SQL report" - which I usually run from SQL*Plus: $ORACLE_HOME/rdbms/admin/awrsqrpt.sql
See: https://jonathanlewis.wordpress.com/2018/10/19/add_colored_sql/
Regards
Jonathan Lewis
Thanks Lewis