sqlplus连接oracle很慢,Oracle sqlplus连接很慢

当一个特定用户在测试库上修改密码后出现连接缓慢的问题,其他用户不受影响。通过strace工具进行系统调用跟踪,发现可能与库文件路径或文件不存在有关。最终,通过修改Weblogic连接池的密码,问题得到解决,表明可能是连接池缓存导致的延迟问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一个测试库上有很多个用户,其中的一个用户修改密码之后,就出现了连接缓慢的情况,而这个数据库上其他的用户连接没有问题。这种问题得先用strace跟踪一下:

strace -T -t -o /tmp/s.out sqlplus test/test

-T  Show the time spent in system calls. This records the time difference between the beginning and the end of each system  call.

-o  Write the trace output to the file filename rather than to stderr.

-t  Prefix each line of the trace with the time of day.

13:55:09 execve("/data1/oracle11g/product/11.2.0.4/db_1/bin/sqlplus", ["sqlplus", "lcam_zc_0130/lcam_zc_pzgpassword"...], [/* 32 vars */]) = 0 <0.000364>

13:55:09 brk(0)                         = 0x1ea1000 <0.000040>

13:55:09 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f32071aa000 <0.000025>

13:55:09 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) <0.000044>

13:55:09 open("/data1/oracle11g/product/11.2.0.4/db_1/lib/tls/x86_64/libsqlplus.so", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000025>

13:55:09 stat("/data1/oracle11g/product/11.2.0.4/db_1/lib/tls/x86_64", 0x7fff3e3dacf0) = -1 ENOENT (No such file or directory) <0.000013>

13:55:09 open("/data1/oracle11g/product/11.2.0.4/db_1/lib/tls/libsqlplus.so", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000014>

13:55:09 stat("/data1/oracle11g/product/11.2.0.4/db_1/lib/tls", 0x7fff3e3dacf0) = -1 ENOENT (No such file or directory) <0.000012>

13:55:09 open("/data1/oracle11g/product/11.2.0.4/db_1/lib/x86_64/libsqlplus.so", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000014>

13:55:09 stat("/data1/oracle11g/product/11.2.0.4/db_1/lib/x86_64", 0x7fff3e3dacf0) = -1 ENOENT (No such file or directory) <0.000013>

13:55:09 open("/data1/oracle11g/product/11.2.0.4/db_1/lib/libsqlplus.so", O_RDONLY) = 3 <0.000019>

.........................

13:55:10 write(10, "\5z\0\0\6\0\0\0\0\0\3s\3\376\377\377\377\377\377\377\377\f\0\0\0\1\1\0\0\376\377\377"..., 1402) = 1402 <0.000016>

13:55:10 read(11, "\4\222\0\0\6\0\0\0\0\0\10\31\0\23\0\0\0\23AUTH_VERSION_S"..., 8208) = 1170 <5.886348>

13:55:15 open("/data1/oracle11g/product/11.2.0.4/db_1/rdbms/mesg/oraus.msb", O_RDONLY) = 9 <0.000075>

13:55:15 fcntl(9, F_SETFD, FD_CLOEXEC)  = 0 <0.000013>

很可惜,不知道这个是什么意思,因为有很多weblogic连到这个库上,weblogic有自动重连的机制,然后把weblogic连接池的密码都修改完后,sqlplus连接速度正常了。真是乱拳打死老师傅啊,问题解决了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值