Skip to Main Content

Oracle Database Discussions

Announcement

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.

How to Bring one particular SQL to AWR report

Raj AruNov 26 2019 — edited Nov 27 2019

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

This post has been answered by AndrewSayer on Nov 26 2019
Jump to Answer

Comments

AndrewSayer
Answer

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

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…

Marked as Answer by Raj Aru · Sep 27 2020
Adityanath Dewoolkar
Raj Aru

Thanks AndrewSayer for the quick help

Jonathan Lewis

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

Raj Aru

Thanks Lewis

1 - 5

Post Details

Added on Nov 26 2019
5 comments
1,115 views