Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2007
    Posts
    47

    Unanswered: create event alert

    I am trying to create an Event Alert in Data Studio.

    It's for DB2 9.5 Windows 2008R2.

    There's data:

    D:\IBM\SQLLIB\BIN>db2 SELECT log_utilization_percent FROM SYSIBMADM.LOG_UTILIZATION

    LOG_UTILIZATION_PERCENT
    -----------------------
    0.82

    1 record(s) selected.
    Now, the query for the alert will be:

    D:\IBM\SQLLIB\BIN>db2 SELECT LOG_UTILIZATION_PERCENT, CASE WHEN LOG_UTILIZATION_PERCENT > .01 THEN -1 ELSE 0 END AS USEDLOG FROM SYSIBMADM.LOG_UTILIZATION

    D:\IBM\SQLLIB\BIN>

    As you can see, there's no output.

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    You must surround your query by quotes if you use a special character like '>'.
    Try this:

    D:\IBM\SQLLIB\BIN>db2 "SELECT LOG_UTILIZATION_PERCENT, CASE WHEN LOG_UTILIZATION_PERCENT > .01 THEN -1 ELSE 0 END AS USEDLOG FROM SYSIBMADM.LOG_UTILIZATION"
    Regards,
    Mark.

Posting Permissions

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