Can I connect with Database using Session Bean

Hi,
I am new to EJB. I have small doubt.
can I connect with Database using Session Bean.
Regards,
Murali.

Double post of http://forum.java.sun.com/thread.jspa?threadID=687239&tstart=0

Similar Messages

  • Is it possible to connect database using session bean

    Dear all,
    Is it possible to connect database using session bean without using entity beans like cmp,bmp.
    if ur answer is yes, then pls tell me where to put the select statement and transaction attribute like(6 types).
    if u have sample code, then it is good for me.
    Hope I will get answer.

    Sure it is.
    Try something like this (and maybe get a book on JDBC):
    String name;
    try {
         InitialContext ic = new InitialContext();
         DataSource ds = (DataSource) ic.lookup(Constants.MY_DATASOURCE);
         Connection connection = ds.getConnection();
         String sql = "SELECT * FROM TABLE";
         PreparedStatement statement = connection.prepareStatement(sql);
         ResultSet rs = statement.executeQuery();
         while (rs.next()) {
              name = rs.getString("NAME");
         if (rs != null)
              rs.close();
         if (statement != null)
              statement.close();
         if (connection != null)
              connection.close();
    catch (NamingException e) {
         // Can't get JDBC datasource
         // ... do something with this exception
    catch (SQLException e) {
         // SQL exception from getter
         // .... do seomthing with this one too
    }

  • General Design With Database and Session Bean Question

    I have an application I am developing where users connect to individual databases located on a server. When they login an admin table is accessed which shows what databases they have permissions to. I am then storing the connection to the database in a backing bean. Hoping to use this connection throughout the session. Is this a good practice to have a users connection left open over the session? I can't create a database pool for each individual database and each user for that database.
    If I can store that database connection in a session bean. How do I access that connection from another bean. Or from another java class? I am using Glassfish for my application server with JSF1.2. I have looked at resource injection but have not had any luck with sharing the session bean information.
    Sorry if this is a trivial question. I have been a Java developer for years. But just starting developing webapps using JSF.
    Thanks

    JuCobb2 wrote:
    I am then storing the connection to the database in a backing bean. Hoping to use this connection throughout the session. Is this a good practice to have a users connection left open over the session? No it is not. Why should you do so? Always keep the lifetime of connection, statement and resultset as short as possible.

  • [b]How can i connect with database(oracle 9i) from form developer at runtim

    Hi Friends,
    My problem is as follows, please show me a way.
    Let's asume, I have form (developed in 6i) which has database data block. Now, at form level a have assigned on_logon trigger and I have written the following PL/SQL statement in that trigger:
    begin
    null;
    end;
    So, when I run this form without connecting to database It does not prompt for a connection. Now I have button lebeled as "Connect" in this form, when user will click on it it will display a window having text boxes to enter user name, password and database name; once the user fill those text boxes and click on a button lebeled as "Ok" then the form runtime environment should be connected with database as per information provided by user. Here to mention that the user already been created, only the connection will be stablished. For example: I want to connect the form with database as "scott/tiger@oradata9i".
    To do this, what PL/SQL command statement should i write in that "OK" button's "when_button_pressed" trigger?
    If any of you know about this please help me.

    Hi
    I've answered this question already. If I understand you right, you can use 'LOGON' built-in of Forms. Take a look into documentation.

  • Connecting with database using setproperty over SOAP connection

    The following method connects to a MySQL database.
    public void setDBDriverName(String in)
         dbDriverName = in;
    public void setDBConnection(String in)
         dbConnection = in;
    public void connectToMySQLDatabase() throws SQLException
         if(dbCon == null)
                 try
                    Class.forName(dbDriverName);     // SQL driver
                    dbCon = DriverManager.getConnection(dbConnection);           // JDBC url
                    s = dbCon.createStatement();
                       catch (Exception e)
                    System.out.println("Could not connect to database using " + dbConnection + " at " + dbDriverName + " : " + e.getMessage());
         else
                System.out.println("Could not connect to databse : Already connected");
    }The method is part of a webservice, in which I use setproperties to set the database connection because the webservice must work with different types of databases like Oracle and MySQL.
    <jsp:useBean id="ContactHistorieClassid" scope="request" class="proxy.soap.ContactHistorieClassProxy" />
         <jsp:setProperty name="ContactHistorieClassid" property="DBConnection" value="org.gjt.mm.mysql.Driver" />
         <jsp:setProperty name="ContactHistorieClassid" property="DBDriverName" value="jdbc:mysql://localhost/contacthistorie" />
         <jsp:setProperty name="ContactHistorieClassid" property="clientID" value="1" />
    <%
         ContactHistorieClassid.connectToMySQLDatabase();
    %>What am I doing wrong here?

    Forgot what happens, sorry. After trying to use the ContactHistorieClassid.connectToMySQLDatabase() method, my server console tells me that it cannot connect to the database, even though it returns the values as they were set in the setproperty.
    When I manually enter the values like this...
    Class.forName("org.gjt.mm.mysql.Driver");     // SQL driver                
    dbCon = DriverManager.getConnection("jdbc:mysql://localhost/contacthistorie"); .. it works properly. So the setproperties are executed as the should be.

  • Issue in connection with database using SQL Developer.

    Hi,
    I am facing a problem in connecting to a remote oracle database, below are the configuration setting which i am trying to use in sql developer to make the connection
    TNS Configuration Details (SUDHIR)
    SUDHIR=
    (DESCRIPTION=
    (ADDRESS=
    (PROTOCOL=TCP)
    (HOST=52.12.xxx.xxx)
    (PORT=1526)
    (CONNECT_DATA=
    (SERVICE_NAME=sudhir)
    User : system
    Password : xxxxxxxxxxx
    Database : sudhir
    Connect as : Normal
    I got the above credential details from Onsite team I need to connect this in my local sytem SQL Developer I am proving the connection as below
    Hostname : 52.12.xxx.xxx
    Port : 1526
    Service Name : sudhir
    Username : xxxxxxxxxxxxxx
    password : xxxxxxxxxxxxx
    I get following error when say test connection in sql developer.
    "The Network Adapter could not establish the connection."
    Please suggest me using the above details how to make the connection success. Please let me know.
    Thanks
    Sudhir
    Edited by: BluShadow on 30-Mar-2012 11:56
    data anonymised by moderator

    (o_0)
    Hopefully for you, the machine is not reachable from internet !
    Your giving online everything needed to log in as system ! that is quite dangerous. I guess the "Onsite team" would be pretty mad discovering that.
    You should edit your previous post before too much people get to it.
    Regarding your problem, I guess you can't get to the machine itself (maybe in a different network).
    Can you try to ping it from your computer ?ping 51.17.130.121
    This is a made-up IP, you'll have to replace with yours

  • Using Session Beans on a read only database

    Hi,
    i am working on a weblogic 6.1 server and have to access a read only database
    using session beans. The transaction attributes of all session beans (we are using
    no entity beans) are set to NOT_SUPPORTED but every time a method is accessed
    an error message is thrown
    BEGIN TRANS in read only database .....
    Is there a way to avoid this?
    Regards
    Edmund

    I guess it is NotSupported. If not try Never.
    --Jay   
    www.architectslobby.org
    An exclusive community for Enterprise Architects

  • Restric the connection with database

    Hi friends,
    My oracle server is 9i. can i restrict the connection with database using application type.
    Eg MSACCESS.EXE
    Regrds
    upul Indika.

    Create this trigger under the sys user. note a user with DBA privilege can still login with msaccess.
    CREATE OR REPLACE TRIGGER trg_logon AFTER logon ON DATABASE
    DECLARE
    tool_name VARCHAR(50);
    BEGIN
      SELECT MAX(PROGRAM)
      INTO tool_name
      FROM sys.v_$session
      WHERE audsid = sys_context('USERENV',   'SESSIONID');
      IF(tool_name = 'MSACCESS.EXE') THEN
        raise_application_error(-20003,   'Login with MSACCESS.EXE is not allowed!');
      END IF;
    END;Regards

  • Cant connect my database using net service_name

    Good Morning to all;
    I trying to connect my database using net service_name , but i am getting error.
    I have tnsnames.ora entry and listener.ora entry.
    Please help me to crack this error.
    SQL> select name from v$database;
    NAME
    ORCLTEST
    SQL> grant connect ,resource to u1 identified by u1;
    Grant succeeded.
    SQL> grant sysdba to u1;
    Grant succeeded.
    SQL> show parameter pass;
    NAME TYPE VALUE
    remote_login_passwordfile string EXCLUSIVE
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    From DBS Directory :
    [oracle@linuxserver dbs]$ orapwd file=orapworcltest password=asdf1234 entries=3
    export ORACLE_SID=orcltest
    [oracle@linuxserver ~]$ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 19:24:22 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR when trying to connect
    SQL> conn u1/u1@ORCLMYTEST
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    SQL> conn u1/asdf1234@ORCLMYTEST
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    Thanks in advance ..

    Can i connect my database using username/password@netservice_name ?
    Yes, you should. Please post the result of "lsnrctl stat LISTENER_ORCL".
    *[oracle@linuxserver admin]$ lsnrctl stat LISTENER_ORCL*
    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-MAR-2013 19:58:18
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linuxserver)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTener_ORcl
    Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date 09-MAR-2013 11:10:14
    Uptime 0 days 8 hr. 48 min. 3 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_orcl.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linuxserver)(PORT=1521)))
    Services Summary...
    Service "MYDB.PROD.ORCLPROD.COM" has 1 instance(s).
    Instance "orclprod", status UNKNOWN, has 1 handler(s) for this service...
    Service "MYDB.TEST.ORCLTEST.COM" has 1 instance(s).
    Instance "orcltest", status UNKNOWN, has 1 handler(s) for this service...
    Service "asdf" has 1 instance(s).
    Instance "asdf", status READY, has 1 handler(s) for this service...
    Service "asdfXDB" has 1 instance(s).
    Instance "asdf", status READY, has 1 handler(s) for this service...
    Service "asdf_XPT" has 1 instance(s).
    Instance "asdf", status READY, has 1 handler(s) for this service...
    Service "orclprod" has 1 instance(s).
    Instance "orclprod", status READY, has 1 handler(s) for this service...
    Service "orclprodXDB" has 1 instance(s).
    Instance "orclprod", status READY, has 1 handler(s) for this service...
    Service "orclprod_XPT" has 1 instance(s).
    Instance "orclprod", status READY, has 1 handler(s) for this service...
    Service "orcltest" has 1 instance(s).
    Instance "orcltest", status READY, has 1 handler(s) for this service...
    Service "orcltestXDB" has 1 instance(s).
    Instance "orcltest", status READY, has 1 handler(s) for this service...
    Service "orcltest_XPT" has 1 instance(s).
    Instance "orcltest", status READY, has 1 handler(s) for this service...
    The command completed successfully

  • Example of using session bean with webservices

    Hello,
    I am working with netbeans 5.5 (with JAX-WS 2.0 library) and using Tomcat.
    I have created webservices and everything is working well so far. However, each webservice is making a connection to my database.
    I would like to use a session bean so that I make the connection only once (at the begining of the client session for example) and store it into my session bean.
    I am a newbie in those things, I search on the Web and on this forum some code examples. The only thing I have found is this article http://weblogs.java.net/blog/ramapulavarthi/archive/2006/06/maintaining_ses.html
    When I tried this, the session doesn't seem to work at all : I get the same result (counter=1) twice.
    Does anybody have a complete example of how to use a session with webservices please?
    Thanks a lot!

    Sorry, I was not very clear in my last message.
    I need all my webservices to share the same bean during one user session.
    Then, if a page calls 2 different web services, only 1 database connection is made instead of 2. And if the user opens other pages which call other webservices, they will use the connection kept into the session bean.
    Anyway, I tried to do like it is said in your website but I can not build my project. I have an error : java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/.../build/web/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. I do not understand because I have downloaded the jax-ws 2.1.1 api and no other libraries are imported in my project. :-(
    I wonder if it is not related to netbeans...

  • I can no longer connect with others using FaceTime after the mandatory update

    I updated my iPad software and now when I try to connect with someone using FaceTime I can never fully connect.
    Can anyone help me or seen this issue?

    Unable to make or receive FaceTime calls after April 16, 2014
    http://support.apple.com/kb/TS5419
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Set Up Alert Sounds
    http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3
    Extra FaceTime IDs
    http://tinyurl.com/k683gr4
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Fix Can’t Sign Into FaceTime or iMessage iOS 7
    http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    iOS 7 allows you to block phone numbers or e-mail addresses from contacting you via the Phone, FaceTime, or Messages
    http://howto.cnet.com/8301-11310_39-57602643-285/you-can-block-people-from-conta cting-you-on-ios-7/
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457#19087457
    How to watch FaceTime calls on the big screen with Apple TV
    http://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetime
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    How to Receive SMS Messages on an iPad
    http://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.html
    Apps for Texting http://appadvice.com/appguides/show/apps-for-texting
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • I can't connect with using connector

    Hi,
    I want to create a system(Solman 4.0) in Portal.I have created a SAP system using dedicated application server and then I filled all necessary fields.I tested with using system connection test.There are two test nameS(SAP Web AS Connection and Connection test for Connectors)Firstly, I checked WAS Connection and everything was ok but when I tested "Connection Test for Connectors" it didn't work.When I clicked test button, it said "Connection failed. Make sure user mapping is set correctly and all connection properties are correct" but I didn't use UIDPW.I used the Logon Ticket method and system_type is SAP_CRM but when I checked log file, it said this message "(R3/BW) Failed to get connection. Please contact your admin".I didin't understand because I have already used SAP_CRM syte sytem type.Why do I get this message. In addition, The ume.usermapping.unsecure is already on TRUE.In short, I can't connect with using connector.What's the problem?

    Hi Vijith,
    I perform your suggestion and I got an error message.This error message is written below.
    Exception in SAP Application Integrator occured: Unable to parse template '<System.ConnectionString>'; the problem occured at position 0. Cannot process expression <System.ConnectionString> because Invalid System Attribute: System: &#39;SAP_LocalSystem&#39;, Attribute: &#39;ConnectionString&#39;. .
    There is a connection string error but I didn't use by using connection string method.I have used by using dedicated application server. At the same time, I have another error message in the dev_jrfc.trc.This error message is as fallows
    Error> occured  >Mon May 07 09:18:37,334<    >RfcGetException rc (7) message: The system is unable to interpret the SSO ticket received
    <RfcGetException
    What's your comment?

  • I can't set up gmail in my iPad 2. Keep on saying ' can't connect with SSL and ask me whether to connect without using SSL, then I press 'yes' and it said again IMAP is not working and tell me to see network connection and incoming mail server.

    I can't set up gmail in my iPad 2. Keep on saying ' can't connect with SSL and ask me whether to connect without using SSL, then I press 'yes' and it said again IMAP is not working and tell me to see network connection and incoming mail server. No idea how to do anymore. Already tried to figure out. But not work. Can anyone pls help me?

    Nope, doesn't pass verification. I get the spinner for a minute or so, then the alert about setting it up without SSL. Are you suggesting I disable Fetch and Push BEFORE I enter the account details? Because I never get past the account details screen, unless I choose "Set up without SSL" after the warning.

  • Datareader is not able to connect with database-Urgent

    Hi All,
    All of a sudden the Datareader component in my ML experiment is not able to connect with database with the following error:
    [ModuleOutput] DllModuleHost Error: 1 : Program::Main encountered fatal exception: Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException: Error 0000: Internal error ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: The value's length for key 'password' exceeds it's limit of '128'.
    Module finished after a runtime of 00:00:00.2031339 with exit code -2
    Module failed due to negative exit code of -2
    It complains about the password being long-but the same credentials I have been using for the last 2 months and still able to use it to run sql queries on that same database using the management portal.
    It appears that Azure encrypts the password and that encrypted password is too long...just my guess after looking that the output.Inside Ml it just says as internal error
    Would appreciate if someone can point to the issue at the earliest...(There is a demo early next week)
    Subscription:Enterprise,
    LOCATION: East Asia
    Regards,
    Biswajit

    Hi,
    Please check this url:
    https://studio.azureml.net/Home/ViewWorkspace/bc85d4f81d2246c4b1430eb395229a3a?&hashSeg=#Workspaces/Experiments/Experiment/bc85d4f81d2246c4b1430eb395229a3a.f-id.11776ae4400f4c1aa9f58308c30810fa/ViewExperiment
    which is an experiment which I created doing save as of the experiment in which the data reader works.
    I stripped everything except the data reader and setup the rest of the components...I finally have to write the results back ,so also pulled a Writer component.
    Now,the data reader works fine..but the Writer fails:
    Error 0071: Incorrect username "acnadmin" or password is passed
    Strangely,its the same credentials set in the DataReader.
    Looks like all the DataInput/Output components created recently only have the problem.
    Once again,while the datareader in this case passes the password in plain text,the writer encrypts,hence fails.

  • TNSping ok..can't connect with sqlPlus ...just stopped working

    Hey Guys,
    I have an Oracle Server running for the last year with little issues.
    The lister just stopped working...
    I can TNSPing ok...I just can't connect with toad or sqlplus anymore from another computer..
    I can connect with sqlplus on the same computer...just not from any other computers.
    =================================================================
    C:\Documents and Settings\Phil>tnsping elvis 5
    TNS Ping Utility for 32-bit Windows: Version 10.1.0.2.0 - Production on 17-JUL-2008 11:10:28
    Copyright (c) 1997, 2003, Oracle. All rights reserved.
    Used parameter files:
    C:\Oracle\product\10.1.0\Client_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=7.7.1.1)(PORT=1521))(CONNECT_DATA=(SID=orcl)))
    OK (70 msec)
    OK (40 msec)
    OK (50 msec)
    OK (50 msec)
    OK (40 msec)
    C:\Documents and Settings\Phil>
    ==================================================
    Listener status info
    ================================================
    LSNRCTL>
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.1.0.4.0 - Production
    Start Date 17-JUL-2008 10:45:26
    Uptime 0 days 0 hr. 29 min. 2 sec
    Trace Level off
    Security ON: Password or Local OS Authentication
    SNMP OFF
    Listener Parameter File D:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
    Listener Log File D:\oracle\product\10.1.0\Db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=elvis)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=elvis)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=elvis)(PORT=2100))(Presentation=FTP)(Session=RAW))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL>
    LSNRCTL>
    LSNRCTL>
    LSNRCTL>
    ==================================================
    Listener.ora
    # listener.ora Network Configuration File: D:\oracle\product\10.1.0\Db_1\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = elvis)(PORT = 1521))
    ====================================================================
    sqlnet.ora
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    ====================================================================
    tnsnames.ora
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = elvis)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    =============================================================================
    I am getting this error from sqlnet.log
    Fatal NI connect error 12638, connecting to:
    (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    VERSION INFORMATION:
    TNS for 32-bit Windows: Version 10.1.0.4.0 - Production
    Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.1.0.4.0 - Production
    Time: 17-JUL-2008 10:23:14
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12638
    TNS-12638: Credential retrieval failed
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0

    LSNRCTL>
    LSNRCTL> services
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=elvis)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "orcl" has 2 instance(s).
    Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:18 refused:0 state:ready
    LOCAL SERVER
    Service "orclXDB" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1002 state:ready
    DISPATCHER <machine: ELVIS, pid: 2284>
    (ADDRESS=(PROTOCOL=tcp)(HOST=elvis)(PORT=1027))
    The command completed successfully
    LSNRCTL>

Maybe you are looking for