DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: from linux command prompt - Oracle up time.

  1. #1
    Join Date
    Jan 2004
    Location
    Washington , USA
    Posts
    132

    from linux command prompt - Oracle up time.

    red hat advance server 2.1
    10g

    i want to find out from the command prompt which date was database LAST restarted.

    in this example it shows 11.23. but no date.

    is there any way .

    ps -ef | grep oracle
    oracle 27212 1 0 11:23 ? 00:00:00 ora_pmon_orcl
    oracle 27214 1 0 11:23 ? 00:00:00 ora_mman_orcl
    oracle 27216 1 0 11:23 ? 00:00:00 ora_dbw0_orcl
    oracle 27218 1 0 11:23 ? 00:00:00 ora_lgwr_orcl
    oracle 27220 1 0 11:23 ? 00:00:00 ora_ckpt_orcl
    oracle 27222 1 1 11:23 ? 00:00:00 ora_smon_orcl
    oracle 27224 1 0 11:23 ? 00:00:00 ora_reco_orcl
    oracle 27226 1 0 11:23 ? 00:00:00 ora_cjq0_orcl
    oracle 27228 1 0 11:23 ? 00:00:00 ora_d000_orcl
    oracle 27230 1 0 11:23 ? 00:00:00 ora_s000_orcl
    oracle 27236 1 0 11:23 ? 00:00:00 ora_qmnc_orcl
    oracle 27238 1 2 11:23 ? 00:00:01 ora_mmon_orcl
    oracle 27240 1 0 11:23 ? 00:00:00 ora_mmnl_orcl
    oracle 27242 1 1 11:23 ? 00:00:01 ora_j000_orcl
    oracle 27244 1 1 11:23 ? 00:00:01 ora_q000_orcl

  2. #2
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Write a small shell script that logs into the database and then gets the startupitme from v$instance.I dont think so its possible other wise.

    regards
    Hrishy

  3. #3
    Join Date
    Jan 2004
    Location
    Washington , USA
    Posts
    132
    shell script it can be done
    #!/bin/sh

    /u01/app/oracle/product/8.1.7/bin/sqlplus system/powell1012 <> /dev/null
    spool start.txt
    set heading off;
    set echo off;
    select startup_time from v\$instance;
    spool off
    EOQ


    -- requirement is to find out at command prompt.
    -- No shell

  4. #4
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    I do not think so you can do it at the command prompt.what you ned to do is put the shell script in the /usr/bin directory and name it something like orauptime.And from the command prompt you can laways say something like orauptime to get the uptime.

    regards
    Hrishy

  5. #5
    Join Date
    Apr 2003
    Posts
    353
    I have seen requirements of seeing OS details from database client(Sql).
    But this is different and reverse of it.
    You need database details from OS.

    If you are in the server, you will have access to your required things.

    Ok. Can you share me you db details, which is needed for my reference(Since you have on itanium and linux --similar to us) .
    We are having one setup of itanium, red hat 2.1 as, and RAC with OCFS
    and 9.2.0.5.
    We are thinking of moving to 10g. If you can able to share the
    compatibilities and isses, it will help us.
    Pls give if there is any link availble on the methods on proceeding towards the above setup.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width