Check DB Connection

    內容表格
    1. 1. From Local
    2. 2. From Remote

    檢查資料庫連線

    From Local

    check_instances.sh

    reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)

    From Remote

    1. tnsping

    • Oracle Client installation

    NOTE: tnsping just check if the LISTENER service on the DB server is running

    $> tnsping <TNS-Alias>
     or
    $> tnsping <db-server-ip>:1521/<SID>
    

    2. check_db_up.sql

    • Oracle Client installation
    • tnsnames.ora
    whenever sqlerror exit 1;
    connect username/password@<<TNS alias>>
    select 1 from dual;
    exit 0;
    

    Run your bash like the follows

    sqlplus /nolog @check_db_up.sq
    

    If that returns 1, there was an error and the database isn't up.

    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core