[20201106]瞭解oracle資料庫啟動時間.txt

lfree發表於2020-11-06

[20201106]瞭解oracle資料庫啟動時間.txt

--//前幾天上班就知道exadata伺服器發生了重啟,檢視alert.log可以確定。
--//但是我發現查詢alert檔案比較麻煩,主要是檔案很大。透過grep過濾定位。

$  grep -n -C 2 "Starting ORACLE instance"  alert_XXXX1.log
61068-Instance terminated by PMON, pid = 23988
61069-Thu Jul 16 16:04:30 2020
61070:Starting ORACLE instance (normal)
61071-************************ Large Pages Information *******************
61072-Parameter use_large_pages = ONLY
--
61183-Instance terminated by USER, pid = 19877
61184-Thu Jul 16 16:31:29 2020
61185:Starting ORACLE instance (normal)
61186-************************ Large Pages Information *******************
61187-Parameter use_large_pages = ONLY
--
61298-Instance terminated by USER, pid = 46733
61299-Thu Jul 16 16:33:11 2020
61300:Starting ORACLE instance (normal)
61301-************************ Large Pages Information *******************
61302-Parameter use_large_pages = ONLY
--
61413-Instance terminated by USER, pid = 49079
61414-Thu Jul 16 16:45:35 2020
61415:Starting ORACLE instance (normal)
61416-************************ Large Pages Information *******************
61417-Parameter use_large_pages = ONLY
--
61528-Instance terminated by USER, pid = 61264
61529-Thu Jul 16 16:53:45 2020
61530:Starting ORACLE instance (normal)
61531-************************ Large Pages Information *******************
61532-Parameter use_large_pages = ONLY

--//不知道什麼回事,啟動了這麼多次。
XXXX> select * FROM dba_hist_database_instance ORDER BY startup_time ;
XXXX> @ prxx
==============================
DBID                          : 2417323702
INSTANCE_NUMBER               : 2
STARTUP_TIME                  : 2014-12-11 03:03:11.000
PARALLEL                      : YES
VERSION                       : 11.2.0.4.0
DB_NAME                       : XXXX
INSTANCE_NAME                 : XXXX2
HOST_NAME                     : dm01dbadm02
LAST_ASH_SAMPLE_ID            : 189431839
PLATFORM_NAME                 : Linux x86 64-bit
==============================
DBID                          : 2417323702
INSTANCE_NUMBER               : 1
STARTUP_TIME                  : 2020-07-16 16:55:00.000
PARALLEL                      : YES
VERSION                       : 11.2.0.4.0
DB_NAME                       : XXXX
INSTANCE_NAME                 : XXXX1
HOST_NAME                     : dm01dbadm01
LAST_ASH_SAMPLE_ID            : 189304861
PLATFORM_NAME                 : Linux x86 64-bit
PL/SQL procedure successfully completed.

dbcn> select * from gv$instance
  2  @ prxx
==============================
INST_ID                       : 2
INSTANCE_NUMBER               : 2
INSTANCE_NAME                 : dbcn2
HOST_NAME                     : dm01dbadm02
VERSION                       : 11.2.0.4.0
STARTUP_TIME                  : 2014-12-11 03:02:36
STATUS                        : OPEN
PARALLEL                      : YES
THREAD#                       : 2
ARCHIVER                      : STARTED
LOG_SWITCH_WAIT               :
LOGINS                        : ALLOWED
SHUTDOWN_PENDING              : NO
DATABASE_STATUS               : ACTIVE
INSTANCE_ROLE                 : PRIMARY_INSTANCE
ACTIVE_STATE                  : NORMAL
BLOCKED                       : NO
==============================
INST_ID                       : 1
INSTANCE_NUMBER               : 1
INSTANCE_NAME                 : dbcn1
HOST_NAME                     : dm01dbadm01
VERSION                       : 11.2.0.4.0
STARTUP_TIME                  : 2020-07-16 16:53:46
STATUS                        : OPEN
PARALLEL                      : YES
THREAD#                       : 1
ARCHIVER                      : STARTED
LOG_SWITCH_WAIT               :
LOGINS                        : ALLOWED
SHUTDOWN_PENDING              : NO
DATABASE_STATUS               : ACTIVE
INSTANCE_ROLE                 : PRIMARY_INSTANCE
ACTIVE_STATE                  : NORMAL
BLOCKED                       : NO

PL/SQL procedure successfully completed.


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

相關文章