All Apps and Add-ons

Oracle RMAN Query taking huge CPU time - Resolution

rbvasu
New Member

All:

Recently we had an issue with our Oracle environment (11.2.0.4/Oracle Cloud Infrastructure) where the following RMAN query was running and taking the highest CPU time due to blocking/deadlock issues.

select status, to_char(cast(start_time as timestamp with time zone),'yyyy-MM-dd"T"HH24:mi:ss.FF3TZH:TZM'), to_char(cast(end_time as timestamp with time zone),'yyyy-MM-dd"T"HH24:mi:ss.FF3TZH:TZM'), object_type, operation from v$rman_status where recid = (select max(recid) from v$rman_status where operation = 'BACKUP' and object_type like 'DB%') or recid = (select max(recid) from v$rman_status where operation = 'BACKUP' and object_type = 'ARCHIVELOG')

As part of the investigation, we found that this query is getting initiated by the Splunk module using the sqlplus and running every minute.

In order to successfully run the query, currently we have applied the sql profile with a better execution plan to avoid becoming a runaway query.

I would like to recommend rewriting this query as follows in the source Splunk module to avoid becoming run away query

select status, to_char(cast(start_time as timestamp with time zone),'yyyy-MM-dd"T"HH24:mi:ss.FF3TZH:TZM'),
to_char(cast(end_time as timestamp with time zone),'yyyy-MM-dd"T"HH24:mi:ss.FF3TZH:TZM'), object_type, operation
from v$rman_status
where recid = (select max(recid) from v$rman_status where operation = 'BACKUP' and object_type like 'DB%')
union
select status, to_char(cast(start_time as timestamp with time zone),'yyyy-MM-dd"T"HH24:mi:ss.FF3TZH:TZM'),
to_char(cast(end_time as timestamp with time zone),'yyyy-MM-dd"T"HH24:mi:ss.FF3TZH:TZM'), object_type, operation
from v$rman_status
where recid = (select max(recid) from v$rman_status where operation = 'BACKUP' and object_type = 'ARCHIVELOG')

If you have any questions/concerns, please let me know.

Thank you

Ramesh Vasudevan

Labels (2)
Tags (1)
0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...