Connection to the database and session

Friends I am developing a JSP based application ,and I am storing Connection (to the database) info in a session variable in my main menu , and then I retrieve the connection session in all the pages that I navigate to.
But a friend of mine told me it is not a good programming practice.He adviced me to use the connection pooling to make effecient use of the connection.
So using session for storing connection to the database is a bad idea ?
I thought it is bad idea to get connected to the database everytime a jsp is thrown ...hence I was using session variable.
Please give ur thought about this.
Thanks.

Well.
You are using a kind of connection pooling already, since you make a connection and reuse it along every jsp page in a session but reusability is at the cut&paste level here.
And what would you do if you needed to share a connection between sessions (scope:application)
Or how would you resolve the need to connect to 2 databases in one JSP page ?? Duplicate the code from the "main menu" ?
If you have let's say 5 applications written as you described and the connection data (ip address, SID, host) changes as someone moves the database to another machine (for example :-))) you will have to manually correct all 5 applications. So it's not much of flexibility in this kind of code.
Connection pooling as I understood it (I might be wrong :-))) is placing the code in a bean or servlet and the parameters in a txt (or better xml) file so when something changes you don't rewrite applications, just rewrite one txt (xml) file and you are done.
If you use a connection pool as a bean you have the bean scopes you can choose from and so on.....
Visit
http://www.codestudio.com/index.shtml
for an example of a very well written connection pool. Maybe there you will find other issues to help you decide.
Hope this helps!
Bye

Similar Messages

  • Itext connect to the database and put values in a table

    Hi, I have a problem because I can't find any tutorial that would connect to the database using the itext servlet and then update the table. I have found a source code that is transferring the database items on the list package of itext. I need an example that is dynamically creating a table. Can anyone please help me with these problem. I need it to for my reports or could anyone suggest an easy to use library rather than itext. THANKS

    tr3k wrote:
    Guys, need your help...I just want to populate a resultSet on an itext table.I don't know what it means to "populate a ResultSet on an iText table". I guess the tool you are using to translate your question to English isn't very good.
    Does it mean you have an iText table (whatever that is) and you want to create a ResultSet that allows you to extract data from it? Or do you really have a table in your database, and you want to use a ResultSet based on that table to create something in iText? Or what?

  • How does it connect to the database

    can anyone pls tell me how the below coding connect to the database, and if i want to change to use other type of connection, which part of the coding should i use? thank
    loginAction.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <html><!-- InstanceBegin template="/Templates/biome.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
    <head>
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- InstanceEndEditable -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <LINK href="bios.css" type=text/css rel=stylesheet>
    <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
    </head>
    <body leftmargin="0" topmargin="0">
    <%@ include file="useAndImport.jsp" %>
    <%
    String username = (String)session.getAttribute("username");
    session.setMaxInactiveInterval(10*60);
    boolean isLoggedIn=work.isUsable(username)?true:false;
    %>
    <table width="100%" height="22" border="0" cellpadding="0" cellspacing="0" bgcolor="#CC3300" class="statusloginsearch">
    <tr>
              <SCRIPT LANGUAGE="JavaScript">
    <!-- Idea by: Nic Wolfe ([email protected]) -->
    <!-- Web URL: http://fineline.xs.mw -->
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=500');");
    // End -->
    </script>
    <form action=loginAction.jsp method=POST>
    <td width="77%" valign="baseline" nowrap id="statusbar">   <% if (isLoggedIn)
    out.println("<img src=images/active.gif width=10 height=15 align=middle><font size=1 color=white face=Verdana, Arial, Helvetica, sans-serif><b>Welcome, " + username + "  </b></font>");%> <% if (!isLoggedIn) { %>
    <font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Username:</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
    <input type=text name=username class="form" <%= work.getValueAttribute(username) %> >
    <font color="#FFFFFF"> Password:</font>
    <input type=password name=password class="form">
    <input type="submit" name="action" value="Login" class="formbutton" onfocus="this.blur()" onmouseover="this.className='formbuttonover';" onmouseout="this.className='formbutton';" onmousedown="this.className='formbuttonover';" onmouseup="this.className='formbuttonover';">
    <input type="reset" name="action" value="Reset" class="formbutton" onfocus="this.blur()" onmouseover="this.className='formbuttonover';" onmouseout="this.className='formbutton';" onmousedown="this.className='formbuttonover';" onmouseup="this.className='formbuttonover';">
    <img src="images/question.gif" alt="what's this?" width="15" height="15" border="0" align="middle">
    <% } %>
    </font></td>
    </form>
    <td width="23%" valign="baseline" nowrap id="statusbar"> <div align="right">
    <% if (isLoggedIn)
    out.println("<form action=SignOut.jsp method=POST><input type=submit name=action value=Logout class=formbutton onfocus=this.blur() onmouseover=this.className='formbuttonover'; onmouseout=this.className='formbutton'; onmousedown=this.className='formbuttonover'; onmouseup=this.className='formbuttonover';></form> <a href=tour.jsp><img src=images/newtothissite.gif border=0 align=middle></a>");%>
      </div></td>
    </tr>
    </table>
    <table width="650" border="0" cellspacing="4" cellpadding="1">
    <tr>
    <td><!-- InstanceBeginEditable name="main" -->
    <table width="580" border="0">
    <tr>
    <td><strong><font color="#CCCCCC" size="+2" face="Arial, Helvetica, sans-serif">ERROR</font></strong></td>
    </tr>
    </table>
    <%-- loginAction.jsp --%>
    <%
    String username1 = request.getParameter("username");
    String password=request.getParameter("password");
    boolean isUsername=work.isUsable(username1);
    boolean isPassword=work.isUsable(password);
    String usernameQuoted=work.getSingleQuoted(username1);
    String usernameParam = work.makeUrlParameter("username",username1);
    ResultSet resultset;
    if(isUsername && isPassword) {
    resultset=db.executeQuery
    ("SELECT * FROM users WHERE USERNAME = " + usernameQuoted);
    if (resultset.next() &&
    resultset.getString("password").equals(password))
    out.println("<font color=green>You are logged on.</font>");
    session.setAttribute("username", username1);
    String accessLevel = resultset.getString("access_level");
         session.setAttribute("access", accessLevel);
         if(accessLevel.equals("0"))
         response.sendRedirect("Welcome.jsp");
         else if(accessLevel.equals("3"))
         response.sendRedirect("Admin.jsp");
    %>
    <%
    } else {
    out.print(work.tryAgain(
    "<font size=2 color=red face=Verdana, Arial, Helvetica, sans-serif><b>Your username and/or password are incorrect.</b>",
    "Login.jsp"+usernameParam));
    } else {
    out.print(work.tryAgain(
    "<font size=2 color=red face=Verdana, Arial, Helvetica, sans-serif><b>Your login information is incomplete.",
    "Login.jsp"+usernameParam));
    %>
    <!-- InstanceEndEditable -->
    </td>
    </tr>
    </table>
    </body>
    <!-- InstanceEnd --></html>
    useAndImport.jsp
    <%-- thingsToUseAndImport.jsp --%>
    <jsp:useBean id="db"
    class="kw.search.DbAccess"
    scope="application"/>
    <jsp:useBean id="work"
    class="kw.search.Worker"
    scope="application"/>
    <jsp:useBean id="dataB"
    class="bb.messageBoard.DataB"
    scope="application"/>
    <jsp:useBean id="forum"
    class="bb.messageBoard.Forum"
    scope="application"/>
    <%@ page import="java.text.DateFormat, java.util.Vector, java.io.*" %>
    DbAccess.java
    package kw.search;
    import java.sql.*;
    public class DbAccess implements java.io.Serializable {
    private Connection connection;
    private Statement statement;
    String db = "btc";
    String user = "javauser";
    String password = "javauser";
    String dbUrl = "jdbc:mysql://localhost:3306/" +db;
    //dbUrl = "jdbc:mysql://localhost:3306/"+db;
    public DbAccess ()
    throws ClassNotFoundException, SQLException
    Class.forName("com.mysql.jdbc.Driver");
    //connection = DriverManager.getConnection ("jdbc:mysql://localhost:3306/btc?"+"user=javauser&password=javauser");
    connection = DriverManager.getConnection
    (dbUrl+"?user="+user+"&password="+password);
    connection.setAutoCommit(false);
    statement = connection.createStatement();
    public void executeUpdate(String sqlCommand)
    throws SQLException
    statement.executeUpdate(sqlCommand);
    public ResultSet executeQuery(String sqlCommand)
    throws SQLException
    return statement.executeQuery(sqlCommand);
    public void commit() throws SQLException
    connection.commit();
    public void rollback() throws SQLException
    connection.rollback();
    protected void finalize() throws SQLException
    statement.close();
    connection.close();
    }

    This section of your code makes the connection:
    public DbAccess ()
    throws ClassNotFoundException, SQLException
    Class.forName("com.mysql.jdbc.Driver");
    //connection = DriverManager.getConnection ("jdbc:mysql://localhost:3306/btc?"+"user=javauser&password=javauser");
    connection = DriverManager.getConnection
    (dbUrl+"?user="+user+"&password="+password);
    connection.setAutoCommit(false);
    statement = connection.createStatement();
    public void executeUpdate(String sqlCommand)
    throws SQLException
    statement.executeUpdate(sqlCommand);
    public ResultSet executeQuery(String sqlCommand)
    throws SQLException
    return statement.executeQuery(sqlCommand);
    public void commit() throws SQLException
    connection.commit();
    public void rollback() throws SQLException
    connection.rollback();
    }

  • RDA ---Can not connect to the database

    Folks,
    I am trying to generate an RDA output for ORACLE SUPPORT
    Database:10.2.0.4
    Server: Win 32bit SP1
    STEP 1: ran rda.cmd -S to collect config info
    STEP2: run rda.cmd to generate output
    at this time it asks me the password of the system username as sysdba and errors out saying
    the following
    Processing Initialization module ...
    Enter the password for 'SYSTEM@abc as SYSDBA':
    Please re-enter it to confirm:
    The database to be analyzed (abc) does not appear to be accessible.
    Please do one of the following:
    - If the database is not started, start it in another session, then press
    'Enter' to continue this script after the database has been started;
    - Interrupt this script, start the database or solve the connection
    problem, and next re-run rda; or
    - Hit 'Enter' to continue this script without gathering information from
    the database.
    If you choose to continue without database connection, some information will
    be missing and Oracle Support may request that rda be re-run.
    Press 'Enter' to Continue
    RDA-00501: Database access disabled due to a connection problem
    Has anyone encountered this issue

    Well, I'm not sure if Oracle can't even figure it out. I found this in a connection troubleshooting guide specific to windows....maybe give these a try just to verify again.
    Troubleshooting Steps Common to Unix and Windows
    Connection Issues
    If RDA is unable to connect to the database, and the user is declared as a SYSDBA user when running the setup, ensure that a connection is possible with as the user using AS SYSDBA. For example, if SYSTEM is specified as the username, make sure that you can connect using the following command in sqlplus:
    connect system AS SYSDBA
    If you cannot connect, run the setup again and answer N to that question, or edit the setup file (setup.cfg) and set SYSDBA_USER=0. You can also use the 'TSTdb' test module to obtain more elements on the connection problem. This test can be performed using the following command(s):
    For Windows run:
    rda.cmd -T TSTdb or rda.pl -T TSTdb
    For Unix run:
    rda.sh -T TSTdb or rda.pl -T TSTdb
    If you use TWO_TASK enviroment variable is used to connect to the database, then unset TWO_TASK and run RDA on the server local to the database. This is necessary because RDA depends on a local connection to the database, and automatically unsets TWO_TASK before performing any function.
    Edited by: DBA_Mike on Mar 25, 2009 5:37 AM

  • How to create a link to a web page that is connected to the database?

    i am developing a web form in java using Oracle's JDeveloper. i created the form which is connected to the database and now i want to put a link in a page that when clicked it shows the form and populates it if necessary. i have no idea how to do that, can anyone please give me an example or where i can find an example?

    Its really hard to answer this question with this enough information....Which Jdeveloper version? which technology you are using to create this web form ? ADF BC or others
    If 11g then are you aware of Task flows?

  • Not able to connect to the database while configuring the Hyperion Planning

    Hi all,
    I am trying to configure Hyperion Planning, i am getting error while connection to the database,
    and i am not able to connect to the sqlserver management studio using sql server authentication mode, while installing sql server i selected as windows authentication mode,
    here is my environment:
    OS: Windows Vista
    Database: MS SQL Server 2005, with Windows authentication mode
    Hyperion9.3.1: Planning, Essbase server, shared services.
    can anyone let me know what is the error? or do am i missing any step,
    appreciate your help.
    Thanks
    Afjal

    Hi,
    First of all Vista is not supported as O/S for Hyperion server products, so if you encounter any problems it may be due to that.
    It is possible to use windows authentication mode but some have problems with it and end up going down the sql server authentication route.
    It is possible to change SQL server to mixed mode.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • I want to know the ways of connecting 9iAS to Database and clients to database through 9iAS as middleware.

    My question was about the necessity of implementing OID or any other version of LDAP.
    We have a new 9iAS and 8.1.7 database implementation and i have a doubt about their networking architecture.
    I want to know the ways of connecting 9iAS to Database and clients to database through 9iAS as middleware. We are debating if OID is compulsory or if we can go ahead with this implementation with out OID.
    Can you please help me and provide me couple of implementation designs(i.e connecting clients to database through 9iAS). It would be great if any one can provide me the implementation's with and with out OID.
    -Thanks

    Hi ,
    For all delta and full DTP loads you can get  information in table  RSICCONT .Check table  RSMONICDP  this will give you detail information .Here you will get all the information with timestamp and request id .
    Hope these tables will serve your purpose .
    Regards,
    Jaya

  • Connect to the database of auto Hosted App on Office 365

    Hi All,
    I developed a custom Application for SharePoint on top Office 365 in Auto-hosted mode. The application has SQL database which will be deployed to SQL Azure.
    I would like to read some info from the database but using another tools not from inside the developed application (e.g. SharePoint designer, PowerPivot) to generate some reports.
    When I try to connect to the database after the application installation using SharePoint Designer I get the following error message:
    Cannot open server 'xxxxxxxxxxx' requested by the login. Client with IP address '41.239.166.230' is not allowed to access the server.  To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create
    a firewall rule for this IP address or address range.  It may take up to five minutes for this change to take effect.
    Login failed for user 'db_c6ab7aa1_4572_4d36_b99d_741dee28a139_dbo'.
    This session has been assigned a tracing ID of 'c13ecefa-6aa2-4154-86f8-18d272c73b86'.  Provide this tracing ID to customer support when you need assistance. (Microsoft SQL Server, Error: 40615)
    And since I am using the Autohosted mode, I don;t have he Windows Azure Management Portal. is there a workaround for this issue?
    Kind Regards,
    Thanks in advance for you help. Mahmoud

    Hi m_3ryan,
    The error message shows you need to add your IP Address to the firewall rules of the SQL Azure to get yourself connected. As you deploy the database to SQL Azure, you mean you cannot open window azure management portal?
    Follow the steps in below article, check whether it works:
    How to: Set Firewall rule to connect to SQL Azure – sp_set_firewall_rule:
    http://azure-howto.blogspot.com/2011/05/how-to-set-firewall-rule-to-connect-to.html
    Thanks,
    Qiao
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Qiao Wei
    TechNet Community Support

  • Best Practice for closing a blocking connection to the database.

    Background:
    Using toplink/eclipselink to manage the the connection to the database.
    We support 3 databases, Oracle, Mysql, and MSSQL.
    We host the an application locally (SAAS) and we also distribute it to our clients so they can run it on premise.
    Problem:
    From time to time the application will execute a route that query the DB and will take 10+ minutes. When we find these queries we generally fix them, but it takes time to fix the problem and roll new code to production. We have also found that if an end user executes the query to many times they can potentially bring the service down - maxing out the database connection, or putting a huge load on the DB effectively rendering the system to a crawl.
    During this time period the IT team need a way to abort a transaction. The current approach, for our SAAS solution, to scan the database find to the long running query and kill it. The application is smart enough to recover and everything seems to work fine. This doesn't always work for our on premise customers - often they don't have a DBA or adequate resources to monitor the system. Therefore, I'm looking for a way to have the application kill/close any query that is lasting longer then X minutes. We currently track the duration of every thread so I can get the time the thread has been actively running.
    Stack Trace
    Currently we keep track of how long each thread is running waiting for a response from the database such as the stacktrace below, I would like to grab the connection and physically close it. Since we are using a java socket and it's in a blocking state there is no way for us to interrupt the thread. The only option is to wait for it to receive a response from the db - kill the sql process - or to close the java socket.
    java.net.SocketInputStream.socketRead0(Native Method)
    java.net.SocketInputStream.read(SocketInputStream.java:129)
    com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
    com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
    com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
    com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1931)
    com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2380)
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2909)
    com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
    com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)
    com.mysql.jdbc.Connection.execSQL(Connection.java:2998)
    com.mysql.jdbc.Connection.execSQL(Connection.java:2927)
    com.mysql.jdbc.Statement.executeQuery(Statement.java:956)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:854)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:573)
    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:501)
    org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:536)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:262)
    org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:244)
    org.eclipse.persistence.queries.DataReadQuery.executeNonCursor(DataReadQuery.java:188)
    org.eclipse.persistence.queries.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:144)
    org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664)
    org.eclipse.persistence.queries.DataReadQuery.execute(DataReadQuery.java:130)
    org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2243)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1165)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1125)
    Question
    What is the best way to grab the connection and close it - from another thread?

    The reason for changing the namespace is to guarantee that they appear as different versions.  The namespace is part of the strong name of the DLL when deployed.  Yes they will be deployed to separate servers because a server can only belong
    to one farm.  But when you are doing a migration it won't be clear that you need to install the 2013 version since the .DLL will report that it exists in the 2010 farm already. It will work without changing the namespace, but it would be best to differentiate
    versions at that level to avoid confusion.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • How can I speed up the connection to the database?

    I am running a JSP application with regular JavaBeans not EJB and connecting to the database through these beans. The connection is set to stay in memory as long as the bean is in session. However when I am running more than 7 sql statements seperatly the execution of the page slows down.
    I have tried using connection pooling but doesn't help much.
    I am not using the JDBC setting in JRUN, I am connecting through the jdbc.odbc drivers provided by the JDK. Basically coded the connection and the connection pool.
    Is there something else that can be done to speed up the execution of the page?
    Thanks in advance

    Thank you all for your input I was trying to work this project to learn JSP so I am not looking at purchasing any drivers right now. That is the reason why I stuck to the JDBC-ODBC Bridge. Are there any other drivers available for MS SQL Servers that are free.
    Jschell,
    That suggests you are taxing the system. It could be >connections. It could also be network, cpu, bus, etc. It >could also be memory, if your app starts swapping to >the hard drive it will get substantially slower.How can i figure out which of the above (i.e. memory, cpu, connections, network) are causing the problem.
    (Presumably you explicitly close your >ResultSets/Statements/Connections when you are >done with them.)You are right about that yes I am closing them at the end of the session, which I think should be after all of the SQL's get executed but I could be wrong it might be openeing a new connection for each SQL which inturn might be the reason for this whole problem. I will take a look into that.
    Thank you all once again.

  • 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.

  • Connect to the database straight from the direct access of form builder

    What do i have to put in the direct access of form builder and procedure builder to connect to the database without have to do it once i4ve enter into form or procedure builder, I know i have to put user/password and connect string but in which order or which characters do i have to use.
    Thanks in advance.

    thanks jdendas, that works with forms but not with procedure builder, if i put that it does not start the session with the procedure builder.
    Thanks anyway-

  • Using only 1 connection to the database

    I have to use TopLink to connect to an Access database using the JDBC-ODBC bridge (please don't ask). The problem is that I can only create 1 connection to the database (as the bridge doesn't allow concurrent connections).
    How can I tell TopLink to share the only connection I have for reading and writing?
    I have tried setting the number of connection to 1 and using exclusive read but it allways create 1 to read and one to write...
    help?
    jeremie

    The database session "type" would need to be the same, and you need to go with the "lowest common denominator", which would clearly be Access here... There wouldn't be any advantage to letting TopLink support ServerSession and DatabaseSession combos, we'd always be waiting on the Access database anyways...

  • 10g Enterprise Manager is not able to connect to the database instance

    I am running a Oracle 10g database in Solaris 10 server. When i am trying to connect to the enterprise manager it says Enterprise Manager is not able to connect to the database instance.
    The database instance is open,the listener is up and the agent connection also says that it succeeded.
    The server houses two 10g databases and the EM was working properly till yesterday. Kindly Help.
    Thanks in advance.
    Ram

    Hi,
    The EM is started and if i give emctl status dbconsole
    -bash-3.00$ emctl status dbconsole
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
    Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
    http://gladiator:1158/em/console/aboutApplication
    Oracle Enterprise Manager 10g is running
    Logs are generated in directory /db8/ora10gr2/product/10.2.0/Db_4/gladiator_TROY/sysman/log
    it says that the EM is running. But when i am trying to access the URL it is in IE it says Page cannot be displayed what could be the problem for this???
    Thanks in advance.
    Ram

  • SAP Server  has lost connection to the database!

    Hi Gurus,
    Can some please guide me on this " SAP Server  has lost connection to the database! " what need to be check.
    OS : AIX
    DB : DB2
    thanks
    vamsi

    Hello,
    1)Check if the DB is running.Issue the  following command @ the DB-level
    db2 connect to <SID>.
    2)Also check R3trans -d from the app. server and check for trans.log file for the error.
    Hope it helps.
    Regards,
    Prasanna
    Edited by: Kulkarni Prasanna on Jul 24, 2008 3:53 PM

Maybe you are looking for

  • How to create a connection key for an intranet

    I'm trying to create a connection key for a client of ours to update a page on their intranet. The intranet is only available internally. How do I go about doing this?

  • Help fix my function to show status for all folders

    I have created a function (tow of them for the same purpose) but they are not working. They compile but when i call them I get null result. What I want to do is get folder status for all folders in the database. There is a table called folder with st

  • How to provide links to Table rows

    Hi I hava a scenario like this i will be displaying BAPI Data in the Table in web dynpro application in one view. if i click each line item (row) in the table. it will show the all the row values in a seperate view in PDF form format with Print optio

  • How do i install canon lbp 2900 printer

                   how do i install canon lbp 2900 printer

  • Need to find day of week then set variable

    Hello all! I'm trying to make sure a variable that is a date, needs to be sun to be set as one way, else any other day another way.  Here is my code BEGIN SELECT CASE WHEN @IssueDate2(WEEKDAY, GETDATE()) = 1 THEN (set @IssueDate3_mjssun= CONVERT(VARC