spacealert trigger
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: spacealert trigger

  1. #1
    Join Date
    Dec 2006
    Location
    hyderabad
    Posts
    21

    spacealert trigger

    Hi ,
    pls have a look at this
    here is a procedure to alert the dba when a tablespace datafile is nearing its maxsize
    would this work

    create or replace procedure alrt_size (a out number(5))
    is
    begin
    select sum(bytes) into a from dba_data_files;
    if a:=90;
    dbms_output.put_line('the datafile is nearing its maxsize');
    fi
    end;

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    how is that going to alert the dba? - where is dbms_output going to write to

  3. #3
    Join Date
    Dec 2006
    Location
    hyderabad
    Posts
    21

    spacealert

    well please tell me what should be used overthere instead of

    dbms_output.put_line

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    well whatever program calls your procedure need to have something returned to it - so what is going to call your procedure?

  5. #5
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,014
    Will any data file ever equal 90 bytes?????
    this space intentionally left blank

  6. #6
    Join Date
    Dec 2006
    Location
    hyderabad
    Posts
    21
    Hi ,
    forget abt the size thats just an example

    just tell me if the procedure & logic is right

    or

    is there any other way to do this alert

  7. #7
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,478

    Cool


    Maybe you should check DBA_FREE_SPACE instead and send an e-mail with UTL_SMTP when free space < 10% of DBA_DATA_FILES.

    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  8. #8
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    there is nothing right about it.

    You know there are many tools freely available which do this for you

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