Hello. I am using one Oracle 9i database on a Windows 2000 server and another 9i database on an HP9000 running HP-UX. Also, I am using the DBMS_LDAP package to connect to Active Directory via SSL. Here is my code:
function F_INIT_LDAP_SESSION
return dbms_ldap.session
is
ldap_retval PLS_INTEGER := -1;
ldap_user VARCHAR2(55) := <ldap_user>;
ldap_pwd VARCHAR2(20) := <user_pwd>;
ldap_session DBMS_LDAP.session;
ldap_host VARCHAR2(15) := <ip_address>;
ldap_port VARCHAR2(5) := DBMS_LDAP.SSL_PORT;
wallet_location VARCHAR2 (50) := 'file:/etc/ORACLE/WALLETS/oracle';
wallet_pwd VARCHAR2(10) := <walletpwd>;
BEGIN
-- Choosing exceptions to be raised by DBMS_LDAP library.
DBMS_LDAP.USE_EXCEPTION := TRUE;
-- Initialize ldap library and get session handle.
ldap_session := DBMS_LDAP.init(ldap_host,ldap_port);
-- Make all sessions SSL
ldap_retval := DBMS_LDAP.open_ssl(ldap_session, wallet_location, wallet_pwd, 2);
-- Complex bind to server
ldap_retval := DBMS_LDAP.bind_s(ldap_session, ldap_user, ldap_pwd, DBMS_LDAP.AUTH_SIMPLE);
return ldap_session;
-- Handle Exceptions
EXCEPTION
WHEN OTHERS THEN
-- Unbind from ldap directory
ldap_retval := DBMS_LDAP.unbind_s(ldap_session);
DBMS_OUTPUT.PUT_LINE(' Error code : ' || TO_CHAR(SQLCODE));
DBMS_OUTPUT.PUT_LINE(' Error Message : ' || SQLERRM);
DBMS_OUTPUT.PUT_LINE(' Exception encountered .. exiting');
return null;
END;
The problem I am having is when I execute this code on the Windows 2000 database, it runs very quickly (less than 1 second); however, on the HP-UX machine, it can take anywhere from 38 seconds to 3 minutes. When I step through the function using TOAD debugger, it's the dbms_ldap.open_ssl command that takes a long time to execute. I don't know why this is.
If anyone has any suggestions or answers, they would be greatly appreciated.
Thank you,
Tony
Software/Hardware used:
ASKED:
September 20, 2004 7:56 PM
UPDATED:
June 4, 2012 9:40 PM