警告日誌檔案alert_.log

skyin_1603發表於2016-10-11
警告日誌檔案在日常當中非常重要。利用警告日誌檔案可以監控資料庫例項,
可以檢視資料庫報錯的詳細資訊等。以下是警告日誌檔案的一些獲取方法:

1、檢視警告日誌檔案的方法:
1:
SQL> show parameter background_dump_dest
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/pro
                   
                                                 d/PROD/trace
2:                                             
SQL> show parameter dump
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/pro
                                                 d/PROD/trace
core_dump_dest                       string      /u01/app/oracle/diag/rdbms/pro
                                                 d/PROD/cdump
max_dump_file_size                   string      unlimited
shadow_core_dump                     string      partial
user_dump_dest                       string      /u01/app/oracle/diag/rdbms/pro
                                                 d/PROD/trace

3:熟悉的,可以直接前往以下路徑:
/u01/app/oracle/diag/rdbms/ora11gr2/OCMU/trace

2、警告日誌檔案的作用舉例:

1》開啟資料庫的警告日檔案記錄:

Autotune of undo retention is turned on.

IMODE=BR

ILAT =27

LICENSE_MAX_USERS = 0

SYS auditing is disabled

Starting up:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options.

ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1

System name:    Linux

Node name:      enmo.oracle.com

Release:        2.6.32-100.26.2.el5

Version:        #1 SMP Tue Jan 18 20:11:49 EST 2011

Machine:        x86_64

VM name:        VMWare Version: 6

Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilePROD.ora

System parameters with non-default values:

  processes                = 150

  memory_target            = 800M

  control_files            = "/u01/app/oracle/oradata/PROD/ora_control1.ctl"

  control_files            = "/u01/app/oracle/oradata/PROD/ora_control2.ctl"

  db_block_size            = 8192

  compatible               = "11.2.0"

  undo_tablespace          = "UNDOTBS1"

  remote_login_passwordfile= "EXCLUSIVE"

  db_domain                = "oracle.com"

  dispatchers              = "(PROTOCOL=TCP) (SERVICE=ORCLXDB)"

  audit_file_dest          = "/u01/app/oracle/admin/prod/adump"

  db_name                  = "PROD"

  open_cursors             = 300

Sun Oct 09 22:39:42 2016

PMON started with pid=2, OS id=5067

Sun Oct 09 22:39:43 2016

PSP0 started with pid=3, OS id=5071

Sun Oct 09 22:39:44 2016

VKTM started with pid=4, OS id=5075 at elevated priority

VKTM running at (1)millisec precision with DBRM quantum (100)ms

Sun Oct 09 22:39:44 2016


2》警告日誌檔案記錄建庫的資訊:

MMON started with pid=15, OS id=4601

starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...

Wed Oct 05 23:45:36 2016

MMNL started with pid=16, OS id=4605

starting up 1 shared server(s) ...

ORACLE_BASE from environment = /u01/app/oracle

Spfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilePROD.ora is in old pre-11 format and compatible >= 11.0.0; converting to new H.A.R.D. compliant format.

Thu Oct 06 11:44:15 2016

Warning: VKTM detected a time drift.

Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.

Thu Oct 06 11:56:53 2016

create database prod

   user sys identified by *   user system identified by *   logfile group 1('/u01/app/oracle/oradata/PROD/redo01.log') size 10M blocksize 512,

           group 2('/u01/app/oracle/oradata/PROD/redo02.log') size 10M blocksize 512,

           group 3('/u01/app/oracle/oradata/PROD/redo03.log') size 10M blocksize 512

   maxlogfiles 5

   maxlogmembers 5

   maxloghistory 1

   maxdatafiles 100

   character set US7ASCII

   national character set AL16UTF16

   extent management local

   datafile '/u01/app/oracle/oradata/PROD/system01.dbf' size 325M reuse

   sysaux datafile '/u01/app/oracle/oradata/PROD/sysaux01.dbf' size 325M reuse

   default tablespace users

     datafile '/u01/app/oracle/oradata/PROD/users01.dbf'

     size 50M reuse AUTOEXTEND ON MAXSIZE UNLIMITED

   default temporary tablespace tempts1

     tempfile  '/u01/app/oracle/oradata/PROD/temp01.dbf' size 20M reuse

   UNDO TABLESPACE UNDOTBS1

     datafile '/u01/app/oracle/oradata/PROD/undotbs01.dbf'

     size 50M reuse AUTOEXTEND ON MAXSIZE UNLIMITED

Database mounted in Exclusive Mode

Lost write protection disabled

Thu Oct 06 11:56:56 2016


3》檢視資料庫的動態以及報錯詳細資訊等,例如:

Starting background process SMCO

Tue Oct 11 22:18:30 2016

SMCO started with pid=34, OS id=15807

Tue Oct 11 22:38:41 2016

Some indexes or index [sub]partitions of table SCOTT.TEST have been marked unusable

Some indexes or index [sub]partitions of table SCOTT.TEST_P have been marked unusable

Tue Oct 11 22:40:35 2016

Some indexes or index [sub]partitions of table SCOTT.TEST_P have been marked unusable

Tue Oct 11 22:41:45 2016

Some indexes or index [sub]partitions of table SCOTT.TEST_P have been marked unusable

Some indexes or index [sub]partitions of table SCOTT.TEST_P have been marked unusable

Some indexes or index [sub]partitions of table SCOTT.TEST_P have been marked unusable

Tue Oct 11 23:00:28 2016

Some indexes or index [sub]partitions of table SCOTT.TEST0 have been marked unusable

Some indexes or index [sub]partitions of table SCOTT.TEST_PAR have been marked unusable



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31392094/viewspace-2126148/,如需轉載,請註明出處,否則將追究法律責任。

相關文章