ITPub博客

首页 > 数据库 > Oracle > [20210529]延迟打开数据库.txt

[20210529]延迟打开数据库.txt

原创 Oracle 作者:lfree 时间:2021-06-02 09:10:07 2 删除 编辑

[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博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2775014/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7970344