Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    2

    Arrow Unanswered: create trigger that fire 4 pm daily

    i want to create a trigger that fire after a ady or
    fire 4 pm daily
    in SQLSERVER

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    What you are looking for is a SQL stored procedure scheduled at a particular time as a job .. look in EM under Management --> SQL Server Agent --> Jobs
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  3. #3
    Join Date
    Jan 2004
    Posts
    2
    thanks Enigma

    if want my trigger fire after 24 hours automaticaly
    if you tell me in detail i am very thankful you

  4. #4
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Understand that a trigger cannot be scheduled as a job to be fired every 24 hours. A trigger is a special type of stored procedure that automatically takes effect when the data in a specified table is modified. A trigger is invoked in response to an INSERT, UPDATE, or DELETE statement.
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  5. #5
    Join Date
    Aug 2003
    Location
    Andover, MA
    Posts
    256
    24 hours after what?

    If I understand you correctly, you want it to fire

    1) on insert/update or delete
    2) or 24 hours after the last insert/update or delete
    3) or at 4 o'clock everyday

    Seems like you could set up a trigger to fire your sp_ on insert/update or delete, and scheduled as a job to run at 4 o'clock every day, and that would pretty much take care of case #2. no?
    -bpd

Posting Permissions

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