Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Location
    Locked in side a tiny room with a keyboard and many monitors glowing away in the dark...
    Posts
    25

    Unanswered: Stored Procedures with Time/Date Triggers

    Hi Everyone!

    I am relatively new to SQL Server 2005 (Enterprise Ed) and have several projects that will be needing stored procedures that have either a time trigger or a date trigger. Can anyone point me toward some good online tutorials or texts? I would like to build my basics so I can ask more intelligent questions.

    Thanks to all the gurus in advance!!!
    Torchwood
    "understand, in a sick and twisted sort of way?"

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    What is a "time trigger" and what is a "date trigger", and specifically how do stored procedures "have" them?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jul 2009
    Location
    Locked in side a tiny room with a keyboard and many monitors glowing away in the dark...
    Posts
    25
    Ok, I guess the statement and question should be: I need to create a trigger(s) based on a time parameter/event and a trigger(s) based on a date parameter/event that causes/activates a stored procedure to generate an email notification and/or report. Can anyone point me toward online tutorials or texts?...
    Torchwood
    "understand, in a sick and twisted sort of way?"

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Ok. This seems a reasonable exercise, but since you are new to SQL Server (RDBMSs altogether?) I'll throw out some obligatory reading:
    SQL Server Forums - Trigger Madness

    The first problem you have with your plan, however, is that triggers occur as part of the transaction. As such, any synchronous calls to applications outside of SQL Server can be disastrous. Typical architecture for this is:
    1) Create a table to hold the info you require for the emails
    2) Trigger inserts data into the table and transaction completes
    3) Job scheduled as regularly as required (daily, hourly, every minute) calls a sproc that takes new rows from the table and generates emails using dbmail.

    Above sound ok?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Jul 2009
    Location
    Locked in side a tiny room with a keyboard and many monitors glowing away in the dark...
    Posts
    25
    I was able to answer a few questions right; fake a perky, warm & fuzzy personality in an interview and "WHALA" here I sit, reaching out into the cold, dark vastness of cyberspace.....so, yes I am realtivly new/clueless on this subject, all reports up to now have come from a can. Need to add a few trick ponies.

    See, this is good stuff even with out Roy Roger's horse (Ha, I read the post you listed) and will save me some time.

    Thank you!
    Torchwood
    "understand, in a sick and twisted sort of way?"

Posting Permissions

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