Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the slow login of sqlplus

2025-08-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the knowledge of "how to solve the slow login of sqlplus". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

For a test database, when sqlplus logs in, it is always very slow. This kind of sqlplus / as sysdba local operating system authentication login should be done very quickly.

[oracle@bisal ~] $sqlplus / as sysdba start stuttering and wait about 5 seconds

SQL*Plus: Release 19.0.0.0.0-Production on Thu Dec 17 20:57:48 2020Version 19.3.0.0.0

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

Connected to:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0-ProductionVersion 19.3.0.0.0

Login to other libraries is very fast, almost seconds out, this is strange, but everything happens for a reason, online learning, through strace to see what information can be given to us, strace will record the process of the system call and the signal value received by this process, each system call name, parameter, return value, will be printed to the standard output or-o option specified file

It intercepts and records the system calls which are called by a process and the signals which are received by a process. The name of each system call, its arguments and its return value are printed on standard error or to the file specified with the-o option.

Strace is a useful diagnostic, instructional, and debugging tool. System administrators, diagnosticians and trouble-shooters will find it invaluable for solving problems with programs for which the source is not readily available since they do not need to be recompiled in order to trace them. Students, hackers and the overly-curious will find that a great deal can be learned about a system and its system calls by tracing even ordinary programs. And programmers will find that since system calls and signals are events that happen at the user/kernel interface, a close examination of this boundary is very useful for bug isolation, sanity checking and attempting to capture race conditions.

Man strace can see the specific available parameters and print the call time.

Execute the following instructions

[oracle@bisal] $strace-T-t-o sqlplus.trc sqlplus / as sysdba

Open sqlplus.trc, a pile of content, dazzling, at least for me, really can not understand, but we can read each line of recording time, between the two steps, the interval of 5 seconds, and the actual operation waiting is very similar

This is the one. I waited for 5 seconds and there was a timeout.

21:17:21 poll ([{fd=9, events=POLLIN}], 1, 4991) = 0 (Timeout)

From the context, this paragraph establishes a socket and sees an IP.

Sin_addr=inet_addr ("192.168.15.2")}, 16)

This IP belongs to the DNS server.

[root@bisal ~] # vi / etc/resolv.conf# Generated by NetworkManagersearch localdomainnameserver 192.168.15.2

But we don't have / etc/hosts on this machine. It doesn't seem to be useful just to have a DNS.

Try to annotate the IP in resolv.conf, log in again, this time the second is out, and look at the record of strace, socket request is 127.0.0.1, directly access the local

Similarly, if we configure DNS

[root@bisal ~] # vi / etc/resolv.conf# Generated by NetworkManagersearch localdomainnameserver 192.168.15.2

Simultaneous configuration of / etc/hosts

[root@bisal ~] # vi / etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.15.128 bisal.com bisal

Sqlplus is still very fast, but there is no IP called by sin_addr=inet_addr in the strace record. I don't know much about the network. If you have any expert friends, please give me some advice.

The problem of slow login of sqlplus, this time we used the tool strace, although the use is very shallow, and the trace file may not be able to understand much, but according to the timestamp, some IP information, can give us some hints, maybe this is the 2-8 principle, some of our daily knowledge, may not be very comprehensive and in-depth, but often can solve most of the daily problems, this is the foundation, lay a good foundation, can gradually go deep We need to make progress step by step, and we should not aim too high.

This is the end of "how to solve the slow login of sqlplus". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report