Oracle uses external tables to access Alert Log Files

Source: Internet
Author: User

First create a directory

  1. SQL> showUser
  2. USERIs"SYS"
  3. SQL>Create Or ReplaceDirectory bdumpAs '/U01/app/Oracle/admin/orcl/bdump';
  4. The directory has been created.

Create an External table

  1. SQL>Create TableAlert_log (text varchar2 (400 ))
  2. 2 organization external (
  3. 3 type oracle_loader
  4. 4DefaultDirectory bdump
  5. 5 access parameters (
  6. 6 records delimitedByNewline
  7. 7 nobadfile
  8. 8 nodiscardfile
  9. 9 nologfile
  10. 10)
  11. 11 location ('Alert _ orcl. Log')
  12. 12) reject limit unlimited;
  13. The table has been created.

Query Alert Log Files

  1. SQL>Select Count(*)FromAlert_log;
  2. COUNT(*)
  3. ----------
  4. 5793
  5. SQL>Select*FromAlert_logWhereRownum <10;
  6. TEXT
  7. Bytes ----------------------------------------------------------------------------------------------------
  8. Wed Sep 14 01:01:35 2011
  9. Starting ORACLE instance (normal)
  10. LICENSE_MAX_SESSION = 0
  11. LICENSE_SESSIONS_WARNING = 0
  12. Shared memory segmentForInstance monitoring created
  13. Picked latch-FreeSCN scheme 2
  14. Using LOG_ARCHIVE_DEST_10 parameterDefaultValueAsUSE_DB_RECOVERY_FILE_DEST
  15. AutotuneOfUndo retentionIsTurnedOn.
  16. IMODE = BR
  17. Nine rows have been selected.

A ora-error has occurred while viewing the database.

  1. SQL>Select*FromAlert_logWhereTextLike '% ORA-%';
  2. TEXT
  3. Certificate ----------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. ORA-00942: Table or view does not exist
  5. ORA-12012: Automatic Execution of Job 1 error
  6. ORA-01435: user does not exist
  7. ORA-12012: Automatic job 21 Error
  8. ORA-01435: user does not exist
  9. ORA-12012: Automatic job 21 Error
  10. ORA-01435: user does not exist
  11. ORA-1109 signalled:ALTER DATABASE CLOSENORMAL...
  12. ORA-19504: Unable to Create File"/U01/app/oracle/archivelog/10952_761792499.dbf"
  13. ORA-27040: file creation error
  14. ORA-16038: Log 1Sequence#52 archiving failure
  15. ORA-19504: Unable to Create File""
  16. ORA-00312: Online log 1 thread 1:'/U01/app/oracle/oradata/orcl/redo01.log'
  17. ORA-16014: Log 1Sequence#52 not archived
  18. ORA-00312: Online log 1 thread 1:'/U01/app/oracle/oradata/orcl/redo01.log'
  19. ORA-16014: Log 1Sequence#52 not archived
  20. ORA-00312: Online log 1 thread 1:'/U01/app/oracle/oradata/orcl/redo01.log'
  21. ORA-16014: Log 1Sequence#52 not archived
  22. ORA-00312: Online log 1 thread 1:'/U01/app/oracle/oradata/orcl/redo01.log'
  23. ORA-16014: Log 1Sequence#52 not archived
  24. ORA-00312: Online log 1 thread 1:'/U01/app/oracle/oradata/orcl/redo01.log'
  25. ORA-1509 signalled:Alter DatabaseTest rename file'/U01/app/oracle/test01.dbf' To '/U01/app/oracle/oradata/orcl/test01.dbf'...
  26. ORA-1525 signalled:AlterTablespace test rename datafile'/U01/app/oracle/test01.dbf' To '/U01/app/oracle/oradata/orcl/test01.dbf'...
  27. ORA-1525 signalled:AlterTablespace test rename datafile'/U01/app/oracle/test01.dbf' To '/U01/app/oracle/oradata/orcl/test001.dbf'...
  28. ORA-1525 signalled:AlterTablespace test rename datafile'/U01/app/oracle/test01.dbf' To '/U01/app/oracle/oradata/orcl/test001.dbf'...
  29. ORA-959 signalled:Alter Database DefaultTablespace test...
  30. ORA-959 signalled:Alter Database DefaultTablespace test1...
  31. ORA-3217 signalled:AlterTablespaceTempOffline...
  32. Select 28 rows.

Related Article

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.