how to raise user defined alert

Posted on 2005-05-12
Last Modified: 2008-03-06
It is sql server 2000, I set a user defined alert (error number 99999) from Management->Alert in Enterprise manager, then I try to triger this error by sql statement, something like raiserror 99999, 'test error'.

But the alert is not triggered, why?
Question by:DataField
    1 Comment
    LVL 4

    Accepted Solution

    if exists(select 1 from person where username = @username and personid != @PersonID)
                         RAISERROR (50007, 15, 1)

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Introduction: Often, when running a query with joins, the results show up "duplicates", and often, those duplicates can be "eliminated" in the results using DISTINCT, for example. Using DISTINCT is simple: just add it after the SELECT keyword, an…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now