Based on a SQLException how to know if the database is down?

Hi
How can I know based on a SQLException that the database is down?. I know I can check the errorCode but which error codes indicate that the database is DOWN or not available?
Regards,
Néstor Boscán

If the SQLException is IO exception: Connection refused, one of the causes is that the database instance has not been started. If the SQLException is
IO exception: The Network Adapter could not establish the connection., one of the causes is that the database TNSListener has not been started.

Similar Messages

  • How to know whether the database is using SPFILE or PFILE

    How can i know whether the database is using SPFILE or PFILE.
    There are both initSID.ora and spfileSID.ora in default location.
    The registry entry for ORA_SID_PFILE is C:\oracle\ora90\database\initSID.ora
    Also, if it is using SPFILE than how can i modify the non dynamic parameters when the database is in the close state.
    Manu

    If you do not specify a path of a pfile , when you actually startup a database , then it will be use your pfile , if you specify a path explicitly fot a pfile , then it'll use your pfile.
    Also, if it is using SPFILE than how can i modify the non dynamic parameters when the database is in the close state.sql > create spfile from pfile ;
    the spfile will syncronise with pfile .
    Hare krishna
    Alok

  • How to know MS Access Database is down through Java

    How i would know whether MS Access DataBase is down?
    Is there any specific code for it in Java
    Need a quick reply

    How i would know whether MS Access DataBase is down?"down"? If the file system on which it's running is unavailable, that's the best you can do. If you can't connect, it's "down".
    Is there any specific code for it in JavaNo. Doesn't sound very platform-independent.
    Need a quick replyFast enough?
    %

  • How to know exactly the database update have finished?

    Hi all,
      I use BDC to confirm a Transfer Order, the last screen is reserved for user. User may confirm all the items or some of them or none. So I want to select the TO item data after the BDC to get the confirmed items for the nexe process. Now the problem is, if I select data just after the BDC, the database still not updated yet, so I have to use the statement: WAIT UP TO 2 SECONDS. Is there any better solution for this?

    U can check the lock enteries using below code
      DATA : WRK_SEQG3 TYPE TABLE OF SEQG3.
    DO.
        CALL FUNCTION 'ENQUEUE_READ'
             EXPORTING
                  GCLIENT = SY-MANDT
                  GNAME   = <table neme>
             TABLES
                  ENQ     = WRK_SEQG3.
        CHECK WRK_SEQG3[] IS INITIAL.
        EXIT.
      ENDDO.
    If the control comes out of this do loop then u can find the data in table...so ur select condition wont fails
    Regds
    gv

  • How to know whether the javascript is disabled or not while loading the jsp

    Hi,
    My query is like how to know whether the javascript is disabled or not while loading the Application main JSP in Mozilla browser.
    I want some Java code or JavaScript code.

    To the point, just let JS fire a specific HTTP request inside the same session.
    This can be done in several ways. 1) Create a hidden <img> element and set the `src` attribute so that it will request a (fake) image from the server. The server just have to intercept on this specific request. 2) Fire an ajaxical request and let the server intercept on it. You can use a Filter for this which sets a token in the session scope to inform that the client has JS enabled.

  • How to know whether the Content Type at Library level is Inheriting Parent Content type or not Using Powershell?

    Hi,
    How to know whether the Content Type at Library level is Inheriting Parent Content type or not using Powershell?
    Is there any property for that? Or Do I need to compare the Content type Id's at Site collection level and Library level?
    Any help would be greatly appreciated.
    Thank you,
    AA.

    Hi Ashok,
    For a content type, there is an attribute called Inherits, the value of this attribute determines whether the content type inherits fields from its parent content type when it is created.
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was
    installed. The child content type does not have any fields that users have added to the parent content type.
    More information, please refer to the link:
    https://msdn.microsoft.com/en-us/library/office/aa544268.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to know whether the current database is using a password file or not?

    How to know whether the current database is using a password file or not?

    The remote_password_file is the parameter that determines if you can use or not a password file. The values this parameter can have are NONE, SHARED, EXCLUSIVE. It is pretty obvious, if it is set to either SHARED or EXCLUSIVE the oracle instance has enabled the access through a password file for the SYSDBA and SYSOPER roles.
    ~ Madrid

  • How do know that the battery is fully charged on ios 7

    How do know that the battery is fully charged on ios 7

    When you turn it on from sleep mode, below the time on the lock screen it says how much charged it is.

  • HT1349 how to know if the product r bought from apple store or digi?

    how to know if the porduct r bought from apple store, digi or maxis?

    It doesn't matter whether it was puchased at an Apple Store or at an Apple-Authorized Retailer.  The warranty coverage and options are the same.
    Use selfsolve.apple.com to determine if that device is still covered under warranty.

  • Oracle SQL Developer  error - "The file-based source procedure Name is not present in the database."

    I recently started working on the Oracle SQL developer. I have 'select' privileges on the QA schema and when tried to execute proc in QA. It is giving the error as 'The file-based source <procedure Name>  is not present in the database.  Was it compiled?'
    instead 'you do not have sufficient privileges to execute this procedure'. Did research on internet but with no luck.What configuration changes needed to be done to make it work.Guide me.

    Sounds like you do not have the correct privileges.  What should have been granted to you by the QA user, or some other user with appropriate privileges, is...
    grant EXECUTE on "QA"."<PROCEDURE_OF_INTEREST>" to "<YOUR_USERID>" ;
    Note that a grant of execute on a procedure has nothing to do with grants of select on some or all of QA's tables and views.
    So, as Vadim suggests, from your connection node in SQL Developer's Connections view, if you expand the Other Users node, then expand QA and look in the Procedures node, do you see the procedure of interest?  If not, you cannot expect to be able to execute it from your userid's connection. And even if you do see it, you may have some other privilege that permits viewing but not executing, like...
    The role SELECT_CATALOG_ROLE
    The system privilege SELECT ANY DICTIONARY
    And even if you do not see it there, then having certain other privileges granted to you could permit executing it in general, like...
    The role EXECUTE_CATALOG_ROLE
    The system privilege EXECUTE ANY PROCEDURE
    Also, note that the 3.0 release is a bit dated nowadays. Upgrading to 4.0.3 production or even the 4.1 EA2 (early adopter) release will, in general, give you a better experience.
    Best wishes,
    Gary

  • How to create  a procedure to send a mail if the Database is down?

    Hi,
    I have created the below procedure to send a mail if the count is less than 1300. It scheduled daily @ 15 30 hrs. Its fine.
    CREATE OR REPLACE procedure SCOTT.hrsmail
    is
    v_count number;
    begin
    Select count(*) into v_count from emp;
    if v_count < 1300
    then
    UTL_MAIL.send(sender => '[email protected]',
    recipients => '[email protected]',
    cc => '[email protected]',
    bcc => '[email protected]',
    subject => 'Testing the UTL_MAIL Package',
    message => 'If you get this, UTL_MAIL package
    else
    null; --what you want to do here
    end if ;
    end;
    Sometime the Database is down, so the job is not running.
    How to create a procedure to send a mail if the database is down?
    Pls help me. Its highly appreciated.
    Thanks
    Nihar

    nihar wrote:
    How to create a procedure to send a mail if the database is down?And what if the database is up, but the network down? Or the database up and mail server down? Or mail server undergoing maintenance?
    There are loads of "+What if's+" - and in that respect, playing "+What if database is down..+" in this case does not make any sense. You do not use the database to monitor its own up/down status. You do not rely just on SMTP as notification protocol that the database is down.
    The correct approach would be using something like SNMP as the monitoring protocol. A monitoring system that can process SNMP and perform some basic root cause analysis (e.g. network to the database server down, database server status unknown). And this system supporting notification methods like SMTP, SMS and so on.

  • Hello i would like to stop using outlook (office 2011) and use instead "mail": how can i transfer the database?

    hello i would like to stop using outlook (office 2011) and use instead "mail": how can i transfer the database?

    Hello Sylviefrombuenosaires, here is a link from macworld that can solve your question. Try reading this.
    http://www.macworld.com/article/158112/2011/02/export_outlook_ical.html
    Carlos

  • How to I remove the Bing Drop Down Banner on MSN Homepage

    How do we remove the Bing drop down banner search bar from MSN. We are running Windows Vista and Firefox 4.

    Install Firefox and the Add on called Ad Block Plus, subscribe to the "Easy List" (almost automatic)
    When the image appears again, right click on it and there will be a Ad Block Plus menu option which you then can block the image server.
    Ad Block Plus is wonderful at blocking all sorts of image servers

  • Is there a FM that lets you know whether the database is being locked/down?

    Dear experts,
    I have a situation here where i need to know if the database is being locked or being down.
    I understand that there is a DBID that will determine its availability.
    Thanks for your kind assistance.
    Regards
    Earl

    hi
    for locking:
    CALL FUNCTION 'ENQUEUE_E_TABLE'
    EXPORTING
    tabname = 'ZTABLE'
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    for Unlocking:
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
    tabname = 'ZTABLE'.

  • How do i make the database open automatically at startup in solaris?

    How do i make the database open automatically at startup in solaris?

    need to write a shell script that is invoked from /etc/init.d/ and soft link the following:
    ln -s /etc/init.d/MYoracle /etc/rc3.d/S99oracle
            ln -s /etc/init.d/MYoracle /etc/rc2.d/K99oracle
            ln -s /etc/init.d/MYoracle /etc/rc1.d/K99oracle
            ln -s /etc/init.d/MYoracle /etc/rc0.d/K99oracle
            ln -s /etc/init.d/MYoracle /etc/rcS.d/K99oracleThe shell script should be pretty straight forward.
    Cheers,
    Mich

Maybe you are looking for

  • Multiple Libraries

    Is it possible to have multiple itunes libraries on one computer? I already have one on here and my brother also has an IPOD that is linked to our lap top but we'd prefer to put it on here, it'd just be much easier to deal with. Is there any way we c

  • X11 Quartz Don't want as default Server

    Hi, I recently installed some software that needed me to install X11 - Quartz so I could run it. Once X11 -Quartz was insalled a pop up notice came up saying that I need to logout and login to make it my default server... what does it mean my default

  • Unable to view logs and traces via NWA

    under netweaver administartion I am unable to see logs and traces .when click on the monitor and logs&traces getting the error : "cannot start plug-in". Path : NWA>monitoring>logs and traces. Please help me .

  • I paid for Snappy touch game but it was not installed in my I pad

    What shall I do

  • Adapter Files for Essbase

    Hi, could anyone pls direct me to something I cannot find at all on edelivery: Oracle Data Integrator Knowledge Module for Essbase Release 9.3.1.1 Installation files Oracle Data Integrator Knowledge Module for Essbase Release 9.3.1.1 Samples I think