Re: Capturing sql statement

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 25 Sep 2018 18:07:18 +0000
Message-ID: <CWXP265MB149302BA0A75AD47C6AC7180A5160_at_CWXP265MB1493.GBRP265.PROD.OUTLOOK.COM>


dbms_workload_repository.add_colored_sql()

Supply the sql_id and the SQL will be recorded in the AWR even if it doesn't meet any of the limits set for normal "SQL ordered by ... "

There's a limit of 100 sql_ids that can be "colored" - then you get error:

ORA-13534: Current SQL count(100) reached maximum allowed (100) ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 751

dbms_workload_repository.remove_colored_sql() to remove them from the hit list

Regards
Jonathan Lewis



From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Arun Chugh <arun.chugh1610_at_gmail.com> Sent: 25 September 2018 18:01
To: Oracle Mailing List
Subject: Capturing sql statement

All,

I have one scenario related to capturing of sql statement in history table.. Like dba_hist_sqltext capture the queries that ran for 10 sec or more.. How do I get the sql stmt which took less time say in millisecond.. Any idea pleae share.

Regards,
Arun Chugh

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Sep 25 2018 - 20:07:18 CEST

Original text of this message