See alter error, GREP-A,-B,-C's magical

Source: Internet
Author: User

Alert log records A lot of important information of the database, to develop the habit of constantly checking alert logs, but if the log is very large VI open over and over to find trouble, how to do can check the wrong?

Look at my test.

[[email protected] bdump]$ tail-n alert_ahjcyl.log |grep ora-ora-12012:error on Auto execute of Job 22ora-0005 4:resource busy and acquire with NOWAIT Specifiedora-06512:at "DOCTOR. Spl_sjpt_archusage ", line 18ora-06512:at" DOCTOR. Spl_sjpt_dayly ", line 34ora-06512:at lines 1---Can see an error message, Tail-n xx is the last number of rows passed to grep by the pipe character to view, but not to see the mind, The following lines should be better if you can display the error message line again with an error, and then look down [[email protected] bdump]$ tail-n 10000 alert_ahjcyl.log |grep-a 6 ora-warning: Inbound connection timed out (ORA-3136) Fri Sep 9 18:01:34 2011warning:inbound connection timed out (ORA-3136) Fri Sep 9 18:05:29 2011Thread 1 advanced to log sequence 2566 (LGWR switch) Current log# 6 seq# 2566 mem# 0:/oracle/oradata/ahjcyl  /redo06_02.log log# 6 seq# 2566 mem# 1:/oradata/ahjcyl/redo06_01.logfri Sep 9 20:14:54 2011Thread 1 advanced to Log sequence 2567 (LGWR switch)--ora-1652:unable to extend temp segment by tablespace temp Fri Se P 9 22:18:55 2011ora-1652:unable to extend temp seGment by Tablespace temp Fri Sep 9 22:42:39 2011ora-1652:unable to extend temp segment by Tablespace TEMP Sat Sep 01:03:00 2011Starting control Autobackupcontrol autobackup written to DISK Devi Ce handle '/ORACLE/FLASH_RECOVERY_AREA/AHJCYL/AUTOBACKUP/2011_09_10/O1_MF_S_761446980_76NKP55Y_.BKP ' Sat Sep 10 01:0 3:05 2011ALTER SYSTEM ARCHIVE log--ora-12012:error on Auto execute of Job 22ora-00054:resource busy and acquire with now AIT Specifiedora-06512:at "DOCTOR. Spl_sjpt_archusage ", line 18ora-06512:at" DOCTOR.  Spl_sjpt_dayly ", line 34ora-06512:at line 1Wed Sep 13:02:18 2011Thread 1 advanced to log sequence 2711 (LGWR switch) Current log# 6 seq# 2711 mem# 0:/oracle/oradata/ahjcyl/redo06_02.log current log# 6 seq# 2711 mem# 1:/oradata/ahjcyl/re do06_01.logwed SEP 13:13:49 2011Thread 1 advanced to log sequence 2712 (LGWR switch)--Is it a bit clear if you want a few lines before the error message? then look down [[email protected] bdump]$ tail-n 10000 Alert_ahjcyl.log |gRep-b 6 ora-current log# 1 seq# 2564 mem# 1:/oradata/ahjcyl/redo01_01.logfri Sep 9 18:00:14 2011Thread 1 advanced to Log sequence 2565 (LGWR switch) Current log# 2 seq# 2565 mem# 0:/oracle/oradata/ahjcyl/redo02_02.log current log# 2 seq # 2565 mem# 1:/oradata/ahjcyl/redo02_01.logfri Sep 9 18:01:34 2011warning:inbound Connection timed out (ORA-3136) Fri Se P 9 18:01:34 2011warning:inbound Connection timed out (ORA-3136) – Current log# 6 seq# 2566 mem# 1:/oradata/ahjcyl/red O06_01.logfri SEP 9 20:14:54 2011Thread 1 advanced to log sequence 2567 (LGWR switch) current log# 4 seq# 2567 mem# 0:/ Oracle/oradata/ahjcyl/redo04_02.log current log# 4 seq# 2567 mem# 1:/oradata/ahjcyl/redo04_01.logfri SEP 9 22:18:55 201 1ora-1652:unable to extend temp segment by Tablespace temp Fri Sep 9 22:18:55 2011ora-1652:unabl  E to extend temp segment by-tablespace temp Fri Sep 9 22:42:39 2011ora-1652:unable to extend Temp Segment by + in tableSpace TEMP--but if you look at the front \ Last few lines of the data a+b, then look down [[email protected] bdump]$ tail-n 10000 Alert_ahjcyl.log |grep -C 6 Ora-control autobackup written to DISK device handle '/oracle/flash_recovery_area/ahjcyl/autobackup/2011_09_0 8/O1_MF_S_761322189_76JQTF7G_.BKP ' Completed:alter database add logfile Group 2 ('/oracle/oradata/ahjcyl/redo02_02. Log ', '/oradata/ahjcyl/redo02_01.log ') size 200mThu Sep 8 14:24:03 2011alter database drop logfile Group 3Thu Sep 8 14:24 : 2011ora-1624 signalled During:alter database drop logfile Group 3...Thu SEP 8 14:24:50 2011alter Database Drop Logfi Le group 3Thu Sep 8 14:24:50 2011Starting control Autobackupcontrol autobackup written to DISK device handle '/ora Cle/flash_recovery_area/ahjcyl/autobackup/2011_09_08/o1_mf_s_761322290_76jqxljw_.bkp '--current log# 1 seq# 2564 Mem # 1:/oradata/ahjcyl/redo01_01.logfri Sep 9 18:00:14 2011Thread 1 advanced to log sequence 2565 (lgwr switch) current lo g# 2 seq# 2565 mem# 0:/oracle/oradaTa/ahjcyl/redo02_02.log current log# 2 seq# 2565 mem# 1:/oradata/ahjcyl/redo02_01.logfri Sep 9 18:01:34 2011warning:in Bound connection timed out (ORA-3136) Fri Sep 9 18:01:34 2011warning:inbound connection timed out (ORA-3136) Fri Sep 9 18 : 05:29 2011Thread 1 advanced to log sequence 2566 (LGWR switch) Current log# 6 seq# 2566 mem# 0:/ORACLE/ORADATA/AHJCYL/R Edo06_02.log log# 6 seq# 2566 mem# 1:/oradata/ahjcyl/redo06_01.logfri Sep 9 20:14:54 2011Thread 1 advanced to L  OG sequence 2567 (lgwr switch) current log# 4 seq# 2567 mem# 0:/oracle/oradata/ahjcyl/redo04_02.log current log# 4 seq# 2567 mem# 1:/oradata/ahjcyl/redo04_01.logfri Sep 9 22:18:55 2011ora-1652:unable to extend temp segment by + in table                 Space TEMP Fri Sep 9 22:18:55 2011ora-1652:unable to extend TEMP segment by tablespace Temp Fri Sep 9 22:42:39 2011ora-1652:unable to extend temp segment by @ tablespace temp Sat S EP Ten 01:03:00 2011Starting control Autobackupcontrol autobackup written to DISK device handle '/oracle/flash_recovery_area/ahjcyl/autoback Up/2011_09_10/o1_mf_s_761446980_76nkp55y_.bkp ' Sat Sep 01:03:05 2011ALTER SYSTEM ARCHIVE log--yes that's grep-c specific explanation ask a man, Mans grep

Viewing alter error, GREP-A,-B,-C's magical

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.