- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to retrieve ORA error from alert log for speci...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 09:26 AM
тАО09-18-2008 09:26 AM
how to retrieve ORA error from alert log for specific date?
i am using following command to retrieve ORA ERRORS,
$grep ORA- alert.log|more
it displays all errors..
But i want what errors have been updated sepecific date?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 10:12 AM
тАО09-18-2008 10:12 AM
Re: how to retrieve ORA error from alert log for specific date?
$ awk '/Wed Jul 02/,/xxxx/' alert_xe.log | grep ORA
(xxxx is just a string NOT occuring in the file after teh target date.
But in htat case, why not let awk (or perl) do the whole job:
$ awk '/Wed Jul 02/ {x++} /ORA/ && x' alert_xe.log
If I was serious (paid money) about this then I would
1) roll my alert logs evey week or month.
2) use perl and timelocal to convert the date to a time in seconds, and compare for GT instead of equal, hoping the date is in the file.
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 11:02 AM
тАО09-18-2008 11:02 AM
Re: how to retrieve ORA error from alert log for specific date?
i couldn't understand 'xxxxx'. please help to me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 11:18 AM
тАО09-18-2008 11:18 AM
Re: how to retrieve ORA error from alert log for specific date?
It depends on the date format.
Lets say the file says
Dec 15 2008 - oracle blah blah blah
try
grep "Dec 15 2008" alert.log
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 11:26 AM
тАО09-18-2008 11:26 AM
Re: how to retrieve ORA error from alert log for specific date?
My alert log file contain like this format
Wed Sep 17 16:48:11 2008
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 12:22 PM
тАО09-18-2008 12:22 PM
Re: how to retrieve ORA error from alert log for specific date?
date
"information blob"
The information blob starts with ^ORA- for errors, which are looked for./
Dear "how to retrieve ORA error from alert log file fo",
You asked: "i couldn't understand 'xxxxx'. please help to me"
Please re-read my reply. It was explained in there.
Anyway,
In AWK (and other tools) the construct '/Wed Jul 02/,/xxxx/' is a 'range pattern'.
AWK strart by looking for the begin pattern (here a date) and the range is turned ON when that is seen. With the range ON, all input records are selected and each record is matched against the end-pattern (here xxxx). If the end pattern is not found, then the ranges stays ON. The xxxx, or any other improbale string will never be matched.
Admittedly the construct is better written as: '/Wed Jul 02/,0'
That is... ON when "Wed Jul 02" is seen, OFF = whenever 0 become true, which should be 'never'
Cheers,
Hein.