Pages

Sunday, August 25, 2013

Tail -f in windows

     We have inconvenience in looking alert log when it grows in windows machines as we do it in linux machines with tail -f. Oracle ADRCI utility provide this feature and is very useful. We can also use it via Notepad++ but what we have to switch window to see the last update.

Remember it is 11g feature.

Steps followed:

  1. Set proper environment variables
  2. login to adrci
  3. set sid with set home as below
  4. SHOW ALERT -TAIL -F

C:\Users\mmeerha>adrci

ADRCI: Release 11.2.0.2.0 - Production on Sun Aug 25 23:31:40 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

ADR base = "D:\ORACLE_DB"
adrci> show homes
ADR Homes:
diag\clients\user_mmeerha\host_813904677_80
diag\clients\user_SYSTEM\host_813904677_80
diag\rdbms\clonedb\clonedb
diag\rdbms\orcl\orcl
diag\rdbms\testdb\testdb
diag\tnslsnr\MMEERHA-IN\listener
adrci> set home diag\rdbms\testdb\testdb
adrci> SHOW ALERT -TAIL -F
2013-08-25 23:31:37.488000 +05:30
Archived Log entry 3579 added for thread 1 sequence 3672 ID 0x9a702651 dest 1:
2013-08-25 23:31:42.026000 +05:30
Thread 1 cannot allocate new log, sequence 3675
Checkpoint not complete
  Current log# 1 seq# 3674 mem# 0: D:\ORACLE_DB\TESTDB\TESTDB\REDO01.LOG
2013-08-25 23:31:44.418000 +05:30
Thread 1 advanced to log sequence 3675 (LGWR switch)
  Current log# 2 seq# 3675 mem# 0: D:\ORACLE_DB\TESTDB\TESTDB\REDO02.LOG
Archived Log entry 3580 added for thread 1 sequence 3673 ID 0x9a702651 dest 1:
2013-08-25 23:31:51.635000 +05:30
Archived Log entry 3581 added for thread 1 sequence 3674 ID 0x9a702651 dest 1:
2013-08-25 23:31:58.339000 +05:30
Thread 1 cannot allocate new log, sequence 3676
Checkpoint not complete
  Current log# 2 seq# 3675 mem# 0: D:\ORACLE_DB\TESTDB\TESTDB\REDO02.LOG
2013-08-25 23:31:59.473000 +05:30
Thread 1 advanced to log sequence 3676 (LGWR switch)
  Current log# 3 seq# 3676 mem# 0: D:\ORACLE_DB\TESTDB\TESTDB\REDO03.LOG
2013-08-25 23:32:07.646000 +05:30
Thread 1 advanced to log sequence 3677 (LGWR switch)
  Current log# 1 seq# 3677 mem# 0: D:\ORACLE_DB\TESTDB\TESTDB\REDO01.LOG
2013-08-25 23:32:16.794000 +05:30
Thread 1 cannot allocate new log, sequence 3678
Checkpoint not complete
  Current log# 1 seq# 3677 mem# 0: D:\ORACLE_DB\TESTDB\TESTDB\REDO01.LOG
2013-08-25 23:32:18.185000 +05:30
Archived Log entry 3582 added for thread 1 sequence 3675 ID 0x9a702651 dest 1:
2013-08-25 23:32:19.720000 +05:30
Thread 1 advanced to log sequence 3678 (LGWR switch)
  Current log# 2 seq# 3678 mem# 0: D:\ORACLE_DB\TESTDB\TESTDB\REDO02.LOG
^C
C:\Users\mmeerha>

Happy reading, leave your comments/suggestion.

Reference:

No comments:

Post a Comment