Connection of jsp with sql for retreval of input data

Sir,
i am a beginner.
i want to know how to connect jsp with the sql, and retrieve the values from the database.
could u please help me.
its urgent..
thank you

This has been asked many times so try using the search bar to the left of this page
If you are using Tomcat, there is a tutorial within the documentation
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

Similar Messages

  • Add a new employee - Connection is busy with results for another command

    Hi all,
    I try to add a new employee in my SAP Business One system, but I get an error message like that : [Microsoft][SQL Native Client] Connection is busy with results for another command * (HEM5) (HEM5)
    So I try to see if I get the same message when I update an employee, and I don't get this message.
    Do you have an idea, why I get this error message when I add a new employee ?
    Message was edited by:
            Marc Riar

    Hello,
    I am afraid there maybe two users / workstations using the same user code and one of them is creating (add) and other is update. Try to ask the users/wrokstations.
    Another way out is try to run this query :
    select * from HEM5
    Rgds,
    JM
    http://groups.yahoo.com/group/SBO_Knowledge_Village
    [email protected]

  • Connecting MII server with PCO for Notification

    Hi All,
    I am Trying to connect MII server with PCO for Notification.
    I had given,
    ServerName,Port ,Version,UserName and password, advanced settings also.Eventhough Iam not able to connect to MII server from PCO.So please let me know any other settings to be done to connect.

    Hi Parthee
    Hope you are following the same steps as mentioned in the document.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/108a16e7-1448-2e10-caa3-9b18af7256b8
    Have you tested your connection?
    Regards
    Anshul
    Edited by: Anshul Sahu on Jun 24, 2011 9:34 AM

  • Formula variable for a user input DATE value

    Hi All,
    I want to create Formula variable for a user input DATE value as I need to use it in a formula to compare between user entry date & date in the DSO. Does any body has any idea about it?
    I tried to create formula variable with manual entry but then I am not getting DATE option.
    Regards,
    Sonal

    Hi ,
    You have to create a formula variable in the formula.
    The formula variable in the general tab would have the reference characteristic as your date characteristic on which you have created a user entry variable or on which you intend to create a date entry variable.
    Give the proceesing type as replacement path.
    Next in Replacement path mention you would replace the variable with value of another variable.
    Mention the variable name.(This is the actual varaible created on the selection screen),
    Also mention you would replace only from value/to value of the variable.
    Check the following help link
    [Replacement path type formula variable|http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm]
    Hope this helps,
    Best regards,
    Sunmit.

  • Connection in jsp with a sas server?

    Hi i have a problem with connecting a jsp-application to a sas server.
    I have the following code used to make a connection.
    [begin code]
    [import the packages]
    <%@page errorPage="ErrorPageKBO.jsp" %>
    <%@page import="com.sas.rmi.Connection"%>
    <%@page import="com.sas.rmi.Rocf"%>
    <%@ page import="java.io.*,
    java.util.*,
    java.net.*,
                   javax.servlet.*,
                   java.sql.*,
                   java.util.Date,
    com.sas.collection.StringCollection,
    com.sas.servlet.beans.*,
    com.sas.servlet.beans.html.*,
    com.sas.servlet.util.*" %>
    [code used for connection]
    String Lang="";
    if (session.getAttribute("lang").equals("nl"))
         Lang="Dutch";
    if (session.getAttribute("lang").equals("fr"))
         Lang="French";
         Connection connection = new Connection();
         connection.setHost("Localhost");
         connection.setFunnel(true);
         connection.setFunnelHost("Localhost");
         connection.setProfileName("local1");
         connection.setUseProfile(true);
         Rocf rocf = new Rocf();
         // Begin code om de connectie en rocf objecten in de sessie te zetten.
         com.sas.servlet.util.BoundRocf br = new com.sas.servlet.util.BoundRocf(rocf);
         com.sas.servlet.util.BoundConnection bc = new com.sas.servlet.util.BoundConnection(connection);
         session.setAttribute("cleanupConnection", connection);
         session.setAttribute("cleanupRocf", rocf);
         session.setAttribute("cleanupBc", bc);
         session.setAttribute("cleanupBr", br);
         // Einde code om de connectie en rocf objecten in de sessie te zetten.
         session.setAttribute("rocfAttr",rocf);//nieuw
         com.sas.sasserver.submit.SubmitInterface si = (com.sas.sasserver.submit.SubmitInterface)
              rocf.newInstance(com.sas.sasserver.submit.SubmitInterface.class, connection);
         com.sas.servlet.util.SocketListener socket = new com.sas.servlet.util.SocketListener();
         String pgmText;
         if (request.getParameter("V")!=null)
              pgmText=
              "data _null_;"                                                                                     + "\n" +
              "     call symput(\'ond_nr\',PUT((INPUT(\'" + request.getParameter("V") + "\',HEX.)-TODAY()),Z10.));"               + "\n" +
              "run;";                                                                                     
         else
              pgmText =
              "%let ond_nr="+request.getParameter("ON")+request.getParameter("ON1")+request.getParameter("ON2")+";";
         pgmText=pgmText +
              "%let UpdForm=" + session.getAttribute("updateProfile") + ";" + "\n" +
              "%let lang=" + Lang + ";"                                                                                 + "\n" +
              "libname initieel 'd:/rawdata/ftproot/KBO/initieelprivate';"                                                   + "\n" +
              "filename sock SOCKET '" + (java.net.InetAddress.getLocalHost()).getHostAddress() + ":" + socket.setup()           + "';\n" +
              "%include \"d:/ecodata/nl/servlet/kbo_ps/sasprograms/private_onderneming_&lang..sas\";"                                        + "\n" +
              "%include 'd:/ecodata/nl/servlet/kbo_ps/sasprograms/private_onderneming.sas';";
         socket.start();
         si.setProgramText(pgmText);
         //out.write("<pre>" + pgmText + "</pre>");
         //out.write("<pre>" + si.getLastLogText() + "</pre>");
         pgmText=" ";
         socket.write(out);
         socket.close();
         rocf.stop();
         session.removeAttribute("rocfAttr");
    [end code]
    Now they say that to connect from a common server, where the jsp application is stored and executed, with the sas server named "sng3pubsearch". You just have to change "Localhost" into the name of the sas server!
    But i did that and could'nt connect with the sas server.
    I searched on the Internet and found out that you have to give as well the package name and the host.
    But i don't know just how to code that?
    Can anyone help me in this ?
    Thanks a lot!
    grts
    Wimvg

    Start by moving all this code out of the JSP and into a Servlet or something else. JSP's are for presentation and what you're doing is bad practice.
    That said, you should use code tags when you post code. You should post the error if you're getting one (preferably a stack trace as well). And honestly, you haven't posted enough info for me to help. Maybe someone else has more info.
    Try connecting with a standalone class first. Don't do this in a JSP unless you like headaches.

  • TNS: connection closed error with SQL*net

    Hi all,
    I've got a new installation of Oracle 11.1.0.6.0 enterprise (Linux). It works fine with direct sqlplus connections but I'm having problems with SQL*net and JDBC thin client connections.
    The database is built correctly and works fine:
    user@cthulhu bash[61]: sqlplus user/pwd
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Aug 4 12:59:53 2008
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Linux: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL>
    but if I try to connect using SQL*net I get errors. I have my TNS listener configured and it starts without errors, reporting the database as a service, and tnsping is fine:
    user@cthulhu bash[62]: tnsping cthulhu_mar
    TNS Ping Utility for Linux: Version 11.1.0.6.0 - Production on 04-AUG-2008 13:02:07
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.30)(PORT=1521)) (CONNECT_DATA=(SID=mar)))
    OK (10 msec)
    user@cthulhu bash[63]: sqlplus user/pwd@cthulhu_mar
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Aug 4 13:02:41 2008
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    ERROR:
    ORA-12537: TNS:connection closed
    Enter user-name:
    In listener.log:
    Mon Aug 04 13:02:41 2008
    04-AUG-2008 13:02:41 * (CONNECT_DATA=(SID=mar)(CID=(PROGRAM=sqlplus)(HOST=cthulhu)(USER=marbur))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.30)(PORT=41754)) * establish * mar * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12547: TNS:lost contact
    TNS-12560: TNS:protocol adapter error
    TNS-00517: Lost contact
    Linux Error: 32: Broken pipe
    This is a new instance of Oracle so there is no problem with listener.log being too large (as I've seen elsewhere). I've also tried increasing PROCESSES and SESSIONS in the initSID.ora file without any impact. The listener ports are open through the firewall (and disabling it temporarily makes no difference).
    Any suggestions?!
    Thanks, Matt

    This means nothing to me, but it could to someone else......
    from listener trace:
    2008-08-04 16:19:05.135381 : nlpcaini:env[161] = OLDPWD=/u01/app/oracle/product/11.1.0/db_1
    2008-08-04 16:19:05.135407 : nlpcaini:env[162] = ORA_NET2_DESC=12,15
    2008-08-04 16:19:05.135432 : nlpcaini:env[163] = ORACLE_SPAWNED_PROCESS=1
    2008-08-04 16:19:05.135465 : nlpcaini:exit
    2008-08-04 16:19:05.135498 : nsc2addr:normal exit
    2008-08-04 16:19:05.135536 : nsbeqaddr:entry
    2008-08-04 16:19:05.135566 : nsbeqaddr:connecting...
    2008-08-04 16:19:05.135603 : nsopen:entry
    2008-08-04 16:19:05.135633 : nsmal:entry
    2008-08-04 16:19:05.135667 : nsmal:1012 bytes at 0x81a8538
    2008-08-04 16:19:05.135694 : nsmal:normal exit
    2008-08-04 16:19:05.135722 : nsopenmplx:entry
    2008-08-04 16:19:05.135749 : nsmal:entry
    2008-08-04 16:19:05.135779 : nsmal:2020 bytes at 0x81a8930
    2008-08-04 16:19:05.135804 : nsmal:normal exit
    2008-08-04 16:19:05.135831 : nsiorini:entry
    2008-08-04 16:19:05.135861 : nsbal:entry
    2008-08-04 16:19:05.135889 : nsbgetfl:entry
    2008-08-04 16:19:05.135918 : nsbgetfl:normal exit
    2008-08-04 16:19:05.135966 : nsmal:entry
    2008-08-04 16:19:05.135995 : nsmal:84 bytes at 0x81b3dd8
    2008-08-04 16:19:05.136020 : nsmal:normal exit
    2008-08-04 16:19:05.136057 : nsbal:normal exit
    2008-08-04 16:19:05.136085 : nsiorini:exit (0)
    2008-08-04 16:19:05.136112 : nscpxget:entry
    2008-08-04 16:19:05.136139 : nscpxget:normal exit
    2008-08-04 16:19:05.136168 : nsopenalloc_nsntx:nlhthput on mplx_ht_nsgbu:ctx=81a8538, nsntx=81a8930
    2008-08-04 16:19:05.136196 : nsopenmplx:normal exit
    2008-08-04 16:19:05.136225 : ntpcon:entry
    2008-08-04 16:19:05.136253 : ntpcon:toc = 6
    2008-08-04 16:19:05.136283 : ntpcon:exit
    2008-08-04 16:19:05.136313 : nsopen:opening transport...
    2008-08-04 16:19:05.136341 : ntpcon:entry
    2008-08-04 16:19:05.136367 : ntpcon:toc = 1
    2008-08-04 16:19:05.136404 : sntpcall:entry
    2008-08-04 16:19:05.157048 : sntpcall:detaching from parent with additional fork
    2008-08-04 16:19:05.157304 : sntpcall:hdl[IR]=17, hdl[IW]=16
    2008-08-04 16:19:05.157350 : ntpcon:exit
    2008-08-04 16:19:05.157390 : nserror:entry
    2008-08-04 16:19:05.157428 : nsoptions:entry
    2008-08-04 16:19:05.157459 : nsoptions:lcl[0]=0x0, lcl[1]=0x2006, gbl[0]=0x0, gbl[1]=0x0, cha=0x0
    2008-08-04 16:19:05.157488 : nsoptions:Vectored IO not supported.
    2008-08-04 16:19:05.157518 : nsoptions:lcl[0]=0xf4ffe9ff, lcl[1]=0x6016, gbl[0]=0xe881, gbl[1]=0x0
    2008-08-04 16:19:05.157545 : nsoptions:normal exit
    2008-08-04 16:19:05.157574 : nsnainit:entry
    2008-08-04 16:19:05.157603 : nsnainit:normal exit
    2008-08-04 16:19:05.157642 : nsopen:global context check-in (to slot 6) complete
    2008-08-04 16:19:05.157675 : nsopen:lcl[0]=0xf4ffe9ff, lcl[1]=0x6016, gbl[0]=0xe881, gbl[1]=0x0, tdu=4096, sdu=8192
    2008-08-04 16:19:05.157706 : nsfull_opn:entry
    2008-08-04 16:19:05.157735 : nsfull_opn:cid=6, opcode=65, bl=0, what=0, uflgs=0x0, cflgs=0x0
    2008-08-04 16:19:05.157761 : nsfull_opn:nsctx: state=7, flg=0x4001, mvd=0
    2008-08-04 16:19:05.157790 : nsfull_opn:normal exit
    2008-08-04 16:19:05.157816 : nsopen:normal exit
    2008-08-04 16:19:05.157854 : nsevreg:entry
    2008-08-04 16:19:05.157884 : nsevreg:begin registration process for 6
    2008-08-04 16:19:05.157912 : nsevregPrePost:entry
    2008-08-04 16:19:05.157940 : nsevregPrePost:normal exit
    2008-08-04 16:19:05.157968 : nsevreg:sgt=0, evn=1, evt[2]=0x0
    2008-08-04 16:19:05.157996 : nsevreg:begin notification process for 6
    2008-08-04 16:19:05.158022 : nsevregAffectNotif:entry
    2008-08-04 16:19:05.158050 : nsevregAffectNotif:exit (0)
    2008-08-04 16:19:05.158078 : nsevreg:rdm=0, sgt=0, evt[0]=0x800, [1]=0x800, [2]=0x0, nrg=0
    2008-08-04 16:19:05.158105 : nsevreg:registering for 0x800
    2008-08-04 16:19:05.158135 : ntpctl:entry
    2008-08-04 16:19:05.158162 : ntpctl:exit
    2008-08-04 16:19:05.158203 : nsevreg:normal exit
    2008-08-04 16:19:05.158260 : nsbeqaddr:error exit
    2008-08-04 16:19:05.158289 : nsbequeath:error exit
    2008-08-04 16:19:05.158342 : nsglhe:exit

  • Error JDBC - Connect java instance with sql server

    We are working with SAP Netweaver 7.0 SP 18 and we need to upgrade to SP 23.
    The XML generated contains only ABAP Stack but the SUM also load the Java tab.
    This part of Java is giving me several problems Connection with SQL Server database 2005. Add image of the last error.
    To continue forward I am evaluating the following:
    1. How I can validate data Connection jdbc to connect to the database? How valid username and password that you use? Where
    Best Regards!

    Hi Hidalgo,
    The XML generated contains only ABAP Stack but the SUM also load the Java tab.
    Please check for the following
    1) Existence of  j2ee related profile parameters in SAP profiles ( default, instance and start )
    2) Existence of j2ee related folders on the SAP server
    If you system is only ABAP stack, please remove information identified in option(1) and (2).
    Hope this helps.
    Regards,
    Deepak Kori

  • Need help with SQL for Pie Chart

    I am trying to create a pie charge which would have 3 slices.
    Following sql gives me the expected values when I run the sql command:
    select
    round(avg(CATEGORY_1 + CATEGORY_2 + CATEGORY_3 + CATEGORY_4 + CATEGORY_5),0) "OD Engagements",
    round(avg(CATEGORY_6 + CATEGORY_7 + CATEGORY_13),0) "Talent Engagements",
    round(avg(CATEGORY_8 + CATEGORY_9 + CATEGORY_10 + CATEGORY_11 + CATEGORY_12),0) "Other Engagements"
    from OTD_PROJECT
    where STATUS in ('Open','Hold')
    I get 3 columns labeled: OD Engagements, Talent Engagements and Other Engagements with the correct averages based on the the data.
    I have tried several ways to try to get this to work in the SQL for a pie chart, but keep getting the invalid sql message and it won't save. I also tried saving without validation, but no data is shown on the chart at all.
    I want to have a pie, with 3 slices, one labeled OD Engagements with a value of 27, one labeled Talent Engagements with a value of 43 and one labeled Other Engagements with a value of 30. Then I want to be able to click on each pie slice to drill down to a secondary pie chart that shows the breakdown based on the categories included in that type.
    Since I am not grouping based on an existing field I an unsure what the link and label values should be in the chart sql.

    You'll need something like the below. I have no idea what the URL for the drilldown needs to be. It should create an appropriate link in your app for the particular slice. Mainly the code below breaks the SQL results into three rows rather than three columns. It may well have a syntax error since I can't test.
    select linkval  AS LINK,
           title    AS LABEL,
           calc_val AS VALUE
    FROM   (SELECT 'OD Engagements' AS title,
                   round(avg(CATEGORY_1 + CATEGORY_2 + CATEGORY_3 + CATEGORY_4 + CATEGORY_5),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
            UNION ALL
            SELECT 'Talent Engagements' AS title,
                   round(avg(CATEGORY_6 + CATEGORY_7 + CATEGORY_13),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
            UNION ALL
            SELECT 'Other Engagements' AS title,
                   round(avg(CATEGORY_8 + CATEGORY_9 + CATEGORY_10 + CATEGORY_11 + CATEGORY_12),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
           );

  • Error: connecting to db with SQL Developer

    Hi,
    I have just done a test disaster recovery (complete restore and recovery) of my database. I have successfully restored and recovered my database and managed to open the database , though with a few warnings shown below
    RMAN> alter database open resetlogs;
    database opened
    RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
    RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT row
    s
    ORACLE error from target database:
    ORA-06553: PLS-801: internal error [56319]
    When I try to use sql developer to access the database. I end up getting the following error:
    ORA-06544: PL/SQL:internal error, arguments: [56319], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [56319]
    06544. 00000 - "PL/SQL: internal error, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
    *Cause: A pl/SQL internal error occurred.
    *Action: Report as a bug; the first argument is the internal error number.
    vendor code 6544
    This has been the first time I performed full recovery.
    I am using sqldeveloper 1.1 and running oracle 10g R2
    I was wondering if anybody has come across this problem before
    Any help would be appreciated

    Sorry, I meant that "restore database" and "recover database" commands both completed successfully without errors<br><br>
    I had a try connecting with sql *plus, which I get <br><br>
    ORA-06553:PLS-801 internal error.<br><br>
    <i>HOWEVER</i>, I still get connected, and can run queries against the tables<br><br>
    You'd get better response from the Recovery Manager forum...<br>Sorry you are right,

  • I have problem to connect oracle DB with SQL developer

    I try connect to my oracle db with oracle SQL developer and received that message:
    http://ioj.com/v/camkp
    (pictures 1 and 2)
    if i try connect with sql plus, all well.
    command : select userenv('LANGUAGE') from dual; result: Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select userenv('LANGUAGE') from dual;
    *USERENV('LANGUAGE')
    RUSSIAN_RUSSIA.CL8MSWIN1251*
    in SQL DEVELOPER: (picture 3)
    check\uncheck "Skip NLS Settings", nothing changed.
    what the issue is?

    Then apparently it's still not getting the OS settings right; try to add these to \sqldeveloper\bin\sqldeveloper.conf (maybe region is enough):
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=US
    AddVMOption -Duser.region=USHope that helps,
    K.

  • Connecting iPhone 5 with MacBookPro (for making phone calls)

    Hi,
    I would like to know, if it is possible, to accept incoming calls on my iphone 5-number on the macbook and making calls on the mac via the iphone?
    Is there an App or any programme or even an onboard-solution to realize this?
    I am really an amateur in computer things so I need when it is possible a really step-by-step-description. I couldnt even connect my iPhone with the Mac via Bluetooth.
    Thanks a lot for your help in advance!

    No you cant,
    But you can use facetime
    http://support.apple.com/kb/HT5538
    see Mac 101
    http://www.apple.com/support/macbasics/

  • Help with Sql for Annual Report per month

    Hi, I have been given the task to create an annual report by month that would show company's profits per month and totals in the last column to show which branch had the hightest income.
    Branch||January||February||March||April||May||June....||Total||     
    ABC ||$0.00 ||$0.00 ||$0.00||$0.00||$0.00||$0.00||Total Amt||
    DEF ||$18.01 ||$3.88 ||$18.01||$4.12||$18.01||$3.97||Total Amt||
    Can anyone please help me in giving an idea of how to write sql for this report..? I am building sub-queries for everymonth by giving the dates for Jan/Feb/March..but I think this is not the right way to do this....
    SELECT
    sum(a.commission) December,
    sum(b.commission) November
    FROM
    Select
    c.account_id,
    c.officer,
    c.account_product_class_id,
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.account_id=109 and
    c.status='APPROVED' and
    c.protection_effective between '01-DEC-2009' and '31-DEC-2009'
    Group by
    c.account_id,
    c.officer,
    c.account_product_class_id
    ) a,
    Select
    c.account_id,
    c.officer,
    c.account_product_class_id,
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.account_id=109 and
    c.status='APPROVED' and
    c.protection_effective between '01-NOV-2009' and '30-NOV-2009'
    Group by
    c.account_id,
    c.officer,
    c.account_product_class_id
    ) b
    I always have hight hope from this forum. So please help. Thanks in advance.
    Edited by: Aditi_Seth on Jan 26, 2010 2:29 PM

    You may try a group report on one simple query like:
    Select
    c.account_id, c.officer, to_char(c.protection_effective, 'MM') month
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.status='APPROVED' and .....
    Group by
    c.account_id
    c.officer,
    to_char(c.protection_effective, 'MM')
    break/gropu on account_id, c.officer, to_char(c.protection_effective, 'MM') and total will be automatically calculated by Reports.

  • Connect to database with SQL*Plus: is TNSNAMES.ORA used?

    Hi ,
    we have a local database called DEV01 and a duplicate of this database in a datacenter. To be able to connect to both databases the TNSNAMES.ORA
    on the local database server (not the one in the datacenter) has the following entries:
    /* Entry for local database */
    DEV01_local, DEV01_local.WORLD =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = server01)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SID= DEV01)
    /* Entry for database in datacenter */
    DEV01,DEV01.WORLD =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = server02)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SID = DEV01)
    When I connect to the local database server I set the Oracle-environment as follows:
    export ORACLE_SID=DEV01
    export PATH=/opt/oracle/app/oracle/product/9.2.0/bin:$PATH
    export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2.0
    Now I start SQL*Plus as follows:
    oracle#> sqlplus user/user
    SQL> select instance_name, host_name from v$instance;
    INSTANCE_NAME    HOST_NAME
    DEV01            server01
    Since the SID is on both databases the same (DEV01) I really do not understand how Oracle decides to which database SQL*Plus connects to.
    Is it a matter of the entries in the TNSNAMES.ORA?
    But when I start SQL*Plus as follows:
    oracle#> sqlplus user/user@DEV01_local
    SQL> select instance_name, host_name from v$instance;
    INSTANCE_NAME    HOST_NAME
    DEV01            server01
    or
    oracle#> sqlplus user/user@DEV01
    SQL> select instance_name, host_name from v$instance;
    INSTANCE_NAME    HOST_NAME
    DEV01            server02
    everything is as expected.
    Does anybody know which database gets chosen when just connect with "sqlplus user/user" (without @DEV01 or @DEV01_local)?
    Any help will be appriciated!
    Rgds
    Jan

    Both databases have the SID=DEV01.
    The ORACLE_SID is set to DEV01 - but when connecting I end up at
    oracle#> sqlplus user/user
    SQL> select instance_name, host_name from v$instance;
    INSTANCE_NAME    HOST_NAME
    DEV01            server01
    which is the database with the TNSNAMES.ORA entry "DEV01_local, DEV01_local.WORLD = ..."
    In your case the one defined by ORACLE_SID environment variable => but which from both is it?

  • Connecting oracle database with sql*net via VIP on Ace

    Is there any way to get oracle Database traffic working only via the ACE Blade instead of using a firewall to do packet inspection.
    The case is we have application servers in a DMZ wich should connect via a VIP to a Oracle database on port 1521.
    Normally oracle negotiates the tcp ports wich it will use and a normal firewall will do an inspect and opens up the dynamic channel.
    However on the Ace there is still no Inspect for Sql*net.
    Everthing on routing and connection level works fine tnspings telnet to 1521 works fine. Only when using the application stack the dynamic ports needs to be used.
    In our design a firewall in between this node's is at this moment impossible.
    Any Ideas or examples how to solve this...

    ORA-27140: attach to post/wait facility failedThis is to do with filesystem permissions on $ORALCE_HOME/bin
    Login as the 'oracle' account (or the account with which oracle binaries are installed.
    goto $ORACLE_HOME/bin
    chmod 6751 account_used_to_install

  • Number of connections in JSP with pool cache connection

    I'm using a Bean from examples, its name: "ods", this is Pool Connection Cache, when a user start connection, this open 10 connections. In my project works 20 users, the DBA prefers don't use too many connections. The version of DB is 8.1.7 and web server 9iAS.
    How do I do?
    Can I use other number of connections by session?
    What is the most rapid connection for work?
    The instruction used is:
    <jsp:useBean id="ods" class="oracle.jdbc.pool.OracleConnectionCacheImpl" scope="session" />
    Thanks
    MIGUEL ANGEL CARO
    [email protected]

    Hi,
    Please repost your question in the J2EE forum. This forum is for Web Cache issues only. Sorry about the confusion.
    We'll be changing the title of this forum soon to avoid mispostings.

Maybe you are looking for

  • Video-out adapter (to S-video and composite) giving distorted output.

    Recently, we had an anime-fest in my dorm, and we used my laptop (12 inch powerbook G4) with my TV-out adaptor, specifically from Apple (I didn't want to chain two adapters together). While it worked, after fighting with it for a while (the second di

  • Standard report for settled internal orders

    Hi All, Is there any standard report available in Asset for settled internal orders. We can able to see in S_ALR_87013019.  But all Internal orders are appearing.  I am not able to see settled orders.  How to identify those... (Like flag color differ

  • Error while generating PBS CBW index

    Hi everyone! When I try to generate indices for some cube archives (on /PBS/CBW), I get a job error "No such file or directory"... Here's what I know so far: -The index generation job runs fine for some cube archives, while it doesn't for others; -Th

  • New movie not showing up in iCloud

    New movie "X-Men:Days of Future Past" not showing up in iCloud. Thanks

  • How i can backup & restore in selected data?

    create table a (backup_id number, ......) create table b (backup_id number, ......) create table c (backup_id number, ......) 100 table created how i can backup all data only backup_id = 1?? how can it possible ????