检查alert_sid.log出现:
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Interface type 1 lan1 10.0.0.0 configured from OCR for use as a cluster interconnect
Interface type 1 lan0 192.168.10.0 configured from OCR for use as a public interface
WARNING 192.168.10.0 could not be translated to a network address
Interface type 1 lan0 192.168.1.0 configured from OCR for use as a public interface
Picked latch-free SCN scheme 3
Autotune of undo retention is turned on.
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.1.0.
Metalink解释:
"Event 13740 is an event id used when tracing ASH. It is detected when mapping the SGA during
startup, so this message is only informational. There is no need to worry. There is no way
currently in the code of disabling this message"
我们看到13740事件就是在数据库启动时候,ASH匹配到SGA中的提示信息.
活动会话历史:Active Session History (ASH) statistics (activity of recent sessions)
SQL> select * from v$sgastat where upper(name) like 'ASH%';
POOL NAME BYTES
------------ -------------------------- ----------
shared pool ASH buffers 2097152
我们看到ASH在shared_pool中分配了2M.
在2个CPU的unix上查看:
SQL> select * from v$sgastat where upper(name) like 'ASH%';
POOL NAME BYTES
------------ -------------------------- ----------
shared pool ASH buffers 4194304
可以发现是4M,所以ASH的size=2m*cpu个数
可以通过v$active_session_history查询历史记录,默认保存3天的数据
SQL> select count(*) from dba_hist_active_sess_history;
COUNT(*)
----------
2885
SQL> select count(*) from v$active_session_history;
COUNT(*)
----------
11751
SQL> select to_char(a.sample_time,'yyyymmdd hh24:mi:ss')
2 from dba_hist_active_sess_history a order by a.sample_time;
TO_CHAR(A.SAMPLE_
-----------------
20080624 22:00:04
20080624 22:00:04
20080624 22:00:04
20080624 22:00:14
20080624 22:00:14
20080624 22:00:14
20080624 22:00:24
20080624 22:00:24
20080624 22:00:34
20080624 22:00:34
20080624 22:00:44
dba_hist_active_session_history是每10秒收集一次
SQL> select max(a.sample_time)-min(a.sample_time) from dba_hist_active_sess_history a;
MAX(A.SAMPLE_TIME)-MIN(A.SAMPLE_TIME)
---------------------------------------------------------------------------
+000000007 12:53:57.483
SQL> select max(a.SAMPLE_TIME)-min(a.SAMPLE_TIME) from v$active_session_history a
2 ;
MAX(A.SAMPLE_TIME)-MIN(A.SAMPLE_TIME)
---------------------------------------------------------------------------
+000000003 12:25:53.485
查看这两个表,可以看到dba_hist_active_sess_history 存储7天的数据,v$active_session_history 存储3天的数据,但是v$active_session_history存储的数据受ASH大小的限制,如果数据量大,只能存储当天的一段时间数据
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/175005/viewspace-374706/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/175005/viewspace-374706/