Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2011
    Posts
    6

    Unanswered: Script (status of DB from OEM)

    Hi,

    The script should run from operating system(Solaris) and interact with OEM and provide the status of the databse.. So that unix administrator will get the information about the database rather than any assistance needed from the DBA.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    have unix administrator invoke OEM
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2011
    Posts
    6
    We should provide the link for OEM in the script itself rather than the Unix administrator go and click the link. He should just run the query and get the status of the result.

    Thanks,

  4. #4
    Join Date
    Mar 2011
    Posts
    6
    This is sample to check rman jobs from OEM.
    CREATE OR REPLACE PROCEDURE "OEM"."REMOVEOEMJOBHISTORY" (nDays
    IN number)
    IS

    nOutput_id number ;
    nDate date := sysdate - nDays ;
    nTotal number := 0 ;

    CURSOR output_id_cursor
    IS
    SELECT output_id
    FROM OEM.SMP_VDJ_JOB_LOG
    WHERE time_stamp < nDate;

    BEGIN

    dbms_output.put_line('All Job History from before ' || nDate || ' will be deleted');

    OPEN output_id_cursor;
    LOOP

    FETCH output_id_cursor INTO nOutput_id;

    EXIT WHEN output_id_cursor%NOTFOUND;

    DELETE FROM SMP_VDJ_JOB_OUTPUT
    WHERE blob_id = nOutput_id;

    END LOOP;

    CLOSE output_id_cursor;

    DELETE FROM OEM.SMP_VDJ_JOB_LOG
    WHERE time_stamp < nDate;

    COMMIT;

    END;


    Can any one provide me with the similar kind of script to check the status of database from operating system by looking in to OEM.

    Thanks,

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    if/when DB is DOWN or otherwise NOT available; there is NOTHING to query!
    by definition when ANY query succeeds, the DB is up & available.
    if/when query fails, it could be because any number of possible problems exist.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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