We have a DB which connects to other DB via LDAP connection. We had an issue where db link to another db server is slow.
I have limited expertise on LDAP. This is how i solved the issue.
select * from dual@db_link;
it’s slow first time. In the same session if we run it again, it’s fast.
Opened a SR.Got all the trace files but no update.
I enabled tnsping trace using below command
#TNSPING.TRACE_LEVEL = 16 #TNSPING.TRACE_DIRECTORY=/tmp
It didn’t have time info. So enabled the client and server level trace.
#trace_level_server=16 #trace_level_client=16 #trace_directory_server=/tmp #trace_directory_client=/tmp #trace_file_client=cli1 #trace_file_server=srv1 #trace_unique_client=true
in the trace
[04-AUG-2010 05:20:19:035] nnflilc:Â Opening sync conn to server1.domain.com:123 [04-AUG-2010 05:21:33:947] nnflilc:Â Â ldap_open failed ld:0
almost a minute it waits on server1, then it goes to server 2 and connects
[04-AUG-2010 05:21:33:954] nnflilc:Â Opening sync conn to server2.domain.com:123 [04-AUG-2010 05:21:33:979] nnflalc: entry [04-AUG-2010 05:21:34:009] nnflalc:Â Â Â Â bind call returns 0
This gives the clue that server1 oid is having issue. So we changed the ldap.ora look up
DIRECTORY_SERVERS= (server1.domain.com:123:636,server2.domain.com:123:636)
to
DIRECTORY_SERVERS= (server2.domain.com:123:636,server1.domain.com:123:636)
command to start and stop oid.
oidmon start oidctl server=oidldapd1 instance=1 configset=1 start oidctl server=oidrepld1 instance=1 flags="-h server1 -p 389" start
stop
oidctl server=oidldapd1 instance=1 configset=1 stop;sleep 10 oidctl server=oidrepld1 instance=1 stop;sleep 10 oidmon stop