RDBMS 19.14 ,实际是从11.2.0.4升级到12.2.0.1,再升级到19c。

现象:

1 通过sqlplus /nolog连接的时候,很慢,大约7秒以上

2 startup 启动数据库,也很慢,大约26秒左右

-- 之前连接,大约7秒左右

[oracle@redhat762100 ~]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 8 14:32:30 2022
Version 19.14.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

@>set time on
14:32:33 @>conn /as sysdba
Connected to an idle instance.
14:32:40 SYS@test>startup

-- 启动,至少26秒

2022-03-08T14:32:50.135471+08:00
Starting ORACLE instance (normal) (OS id: 12209)
2022-03-08T14:32:50.159408+08:00



2022-03-08T14:33:16.426496+08:00
CJQ0 started with pid=53, OS id=12468
Completed: ALTER DATABASE OPEN
2022-03-08T14:33:25.983856+08:00

处理方法:

将ldap.ora.samplecopy到$ORACLE_HOME/network/admin 或者$ORACLE_HOME/ldap/admin下 

如果没有这个文件,从其他的机器上copy一个出来,内容如下:

[oracle@redhat762100 admin]$ more ldap.ora
#Sample LDAPP.ORA Configuration File.

DIRECTORY_SERVERS= (localhost:389:636)

DEFAULT_ADMIN_CONTEXT = ""

DIRECTORY_SERVER_TYPE = OID

[oracle@redhat762100 admin]$

处理后的速度

-- sqlplus连接速度,大约3秒 

@>set time on
15:17:34 @>conn /as sysdba
Connected to an idle instance.
15:17:37 SYS@test>

-- startup速度,大约18秒左右

2022-03-08T14:56:01.916195+08:00
Starting ORACLE instance (normal) (OS id: 12232)
2022-03-08T14:56:01.923211+08:00



Starting background process CJQ0
2022-03-08T14:56:16.112751+08:00
CJQ0 started with pid=51, OS id=12589
Completed: ALTER DATABASE OPEN
2022-03-08T14:56:19.790657+08:00
15:20:42 SYS@test>
15:20:42 SYS@test>startup
ORACLE instance started.

Total System Global Area 1476391080 bytes
Fixed Size                  8896680 bytes
Variable Size             671088640 bytes
Database Buffers          788529152 bytes
Redo Buffers                7876608 bytes
Database mounted.
Database opened.
15:20:59 SYS@test>

参考文档:

Slow Start of Sqlplus if Database is Down (Doc ID 2197760.1)

END

-- 2022-03-09 add

今天碰到一个有意思的现象,因为之前listener.ora和tnsnames.ora里面填写的都是主机名,更改成了具体的IP地址后,再次sqlplus /nolog ,conn / as sysdba。就很快。

比较有意思。

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐