Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

oracle 9i archived logs 1

Status
Not open for further replies.
Mar 5, 2008
3
US
I am trying to find a way to report the number of archive logs produced by the hour by day.
 
Within Oracle or the Operating System (if the latter, which)?

I want to be good, is that not enough?
 
Alex,

I find that information by simply doing an "ls -l" (Unix) or "dir" (Windows) on the archive log directory and counting the number of archive log files during the period I want to survey. Another way is to examine the alert log to see the number of log switches within a timestamp range.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
One way to do this is to query v$archived_log. The following query will list the number of archived logs produced each hour of the day yesterday.

Code:
select to_char(completion_time,'yyyy/mm/dd hh24'), count(*) from v$archived_log
  where completion_time between trunc(sysdate-1) and trunc(sysdate)
  group by to_char(completion_time,'yyyy/mm/dd hh24')
  order by 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top