get date and error from alertlog


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting get date and error from alertlog
# 1  
Old 01-16-2008
get date and error from alertlog

Hi

I need to print oracle alertlog messages and get date and ORA- error on the same line

I use bash on solaris 10

I hope you can help me out

Br Tom
# 2  
Old 01-16-2008
Quote:
Originally Posted by ludvig
Hi

I need to print oracle alertlog messages and get date and ORA- error on the same line

I use bash on solaris 10

I hope you can help me out

Br Tom
We can help you only if YOU can help US to help you.
Pls post a sample log and desired result based on the sample
# 3  
Old 01-16-2008
something like this

Sun Aug 22 02:31:12 2004
ARC0: Beginning to archive log# 3 seq# 15338
ARC0: Completed archiving log# 3 seq# 15338
Sun Aug 22 02:31:45 2004
ORA-00600: internal error code, arguments: [kccchb_1], [87478], [87469],

Sun Aug 22 02:32:14 2004
Shutting down instance (abort)
License high water mark =3D 2
Instance terminated by USER, pid =3D 12911
lter tablespace RBS begin backup
Completed: alter tablespace RBS begin backup
Sun Aug 22 02:18:15 2004
alter tablespace SYSTEM begin backup
Completed: alter tablespace SYSTEM begin backup

i need a result like this on one line with date first

Sun Aug 22 02:31:45 2004 ORA-00600: internal error code, argument .........

thanks
Tom
# 4  
Old 01-16-2008
assuming the date preceeds the ORA error:
Code:
nawk '/^ORA-/ { print prev, $0; next} { prev=$0}' myOracleLogFile.log

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date 19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies

2. UNIX for Beginners Questions & Answers

Getting error while using date as a variable in expect

Hi getting error when i am saving date command output in a variable and then using the same variable in expect #!/usr/bin/expect set DATE spawn sftp AUT#XX.XX.XX.XX spawn echo $DATE expect "password:" send "AT123\n" expect "sftp>" send "cd /home/ \r" expect "sftp>" send... (12 Replies)
Discussion started by: scriptor
12 Replies

3. Shell Programming and Scripting

Error executing date script

Hi, Seen below is a simple date script. #! /bin/ksh VL = `date +%m/%d` VL1 = `TZ=GMT+24 date +%m/%d` VL2 = `TZ=GMT+48 date +%m/%d` VL3 = `TZ=GMT+72 date +%m/%d` VL4 = `TZ=GMT+96 date +%m/%d` VL5 = `TZ=GMT+120 date +%m/%d` echo $VL echo $VL1 echo $VL2 echo $VL3 echo $VL4 echo... (2 Replies)
Discussion started by: jayadanabalan
2 Replies

4. Shell Programming and Scripting

Get Previous day error from alertlog

Hi All, I want to get the all ORA- related errors from attached logfile for previous day. Pls help. Thanks ! Regards Kamal (7 Replies)
Discussion started by: kamauv234
7 Replies

5. Shell Programming and Scripting

Converting a date to friday date and finding Min/Max date

Dear all, I have 2 questions. I have a file with many rows which has date of the format YYYYMMDD. 1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too. 2. After converting the date to... (10 Replies)
Discussion started by: 2001.arun
10 Replies

6. Shell Programming and Scripting

Date Call in Script Error

Hello, Got a simple script: a="Something" b=$(date +"%y%j") c="something else" d="$a$b$c" echo "$d" On running it gives the error: scripty.sh: syntax error at line 2: `b=$' unexpected Can't understand it, any ideas? (3 Replies)
Discussion started by: Damocles
3 Replies

7. Solaris

ultra 10 showing Date ERROR

ultra 10 showing date error. it showing date --:--:1967 frequently.sometimes it shows correct date. (3 Replies)
Discussion started by: yesquery
3 Replies

8. Shell Programming and Scripting

how to copy an alertlog file from a particular time stamp?

Hi, Can any one tell me how to copy an alertlog file from a particular time stamp using shell script? Thanks (3 Replies)
Discussion started by: suman_dba1
3 Replies

9. Shell Programming and Scripting

How to get ORA errors in alertlog file using shell script.

Hi, Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script. Thanks (3 Replies)
Discussion started by: suman_dba1
3 Replies

10. Shell Programming and Scripting

Error with Date cmd

Hi all, When i execute the below command its giving an error "date: Bad conversion" date \"+DATE %m/%d/%Y HEURE %H:%M:%S\" (4 Replies)
Discussion started by: krishna_gnv
4 Replies
Login or Register to Ask a Question

Featured Tech Videos