[20210529]延遲開啟資料庫.txt

dapolan發表於2022-03-09

[20210529]延遲開啟資料庫.txt

--//不知道這樣操作有什麼作用,記錄一下:

SYS@book> set timing on
SYS@book> startup mount;
ORACLE instance started.

Total System Global Area  676491264 bytes
Fixed Size                  2256192 bytes
Variable Size             239076032 bytes
Database Buffers          427819008 bytes
Redo Buffers                7340032 bytes
Database mounted.
SYS@book> oradebug setmypid
Statement processed.
SYS@book> set timing on
SYS@book> oradebug event db_open_begin delay=20
Statement processed.

SYS@book> alter database open ;
Database altered.

Elapsed: 00:00:21.64
SYS@book> select sysdate from dual ;
SYSDATE
-------------------
2021-06-02 08:59:32

Elapsed: 00:00:00.00

--//看看alter的記錄:
alter database open
--//執行前等20秒後採用如下資訊。
Wed Jun 02 08:59:30 2021
LGWR: STARTING ARCH PROCESSES
Wed Jun 02 08:59:30 2021
ARC0 started with pid=22, OS id=36296
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Thread 1 opened at log sequence 1173
  Current log# 2 seq# 1173 mem# 0: /mnt/ramdisk/book/redo02.log
Successful open of redo thread 1
Wed Jun 02 08:59:31 2021
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Wed Jun 02 08:59:31 2021
SMON: enabling cache recovery
Wed Jun 02 08:59:31 2021
ARC1 started with pid=23, OS id=36298
[36291] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:1054168652 end:1054168722 diff:70 (0 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is ZHS16GBK
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
WARNING: AQ_TM_PROCESSES is set to 0. System operation                     might be adversely affected.

--//不過執行如下效果一樣:
SYS@book> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup mount;
ORACLE instance started.
Total System Global Area  676491264 bytes
Fixed Size                  2256192 bytes
Variable Size             239076032 bytes
Database Buffers          427819008 bytes
Redo Buffers                7340032 bytes
Database mounted.

SYS@book> set timing on
SYS@book> alter system set events 'db_open_begin delay=10' ;
System altered.
Elapsed: 00:00:00.00

SYS@book> alter database open;
Database altered.
Elapsed: 00:00:11.63

--//alert:
alter database open
Wed Jun 02 09:06:39 2021
LGWR: STARTING ARCH PROCESSES
Wed Jun 02 09:06:39 2021
ARC0 started with pid=22, OS id=36475
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Thread 1 opened at log sequence 1173
  Current log# 2 seq# 1173 mem# 0: /mnt/ramdisk/book/redo02.log
Successful open of redo thread 1
Wed Jun 02 09:06:40 2021
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Wed Jun 02 09:06:40 2021
SMON: enabling cache recovery
Wed Jun 02 09:06:40 2021
ARC1 started with pid=23, OS id=36477
[36469] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:1054597802 end:1054597862 diff:60 (0 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is ZHS16GBK
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
WARNING: AQ_TM_PROCESSES is set to 0. System operation                     might be adversely affected.

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

相關文章