Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Triggers

Triggers

Scheduled Pinned Locked Moved Database
databasehelpannouncement
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Morgs Morgan
    wrote on last edited by
    #1

    Hi guys, I would like to create a trigger that must execute at a certain time.e.g. '2010-06-08 12:00:00' I know there are stuff such as insert, update, and delete triggers. But is there a way that i can set a time when that trigger should fire....other than using sql jobs Please anyone help me. Thanks, Morgs

    M D T 3 Replies Last reply
    0
    • M Morgs Morgan

      Hi guys, I would like to create a trigger that must execute at a certain time.e.g. '2010-06-08 12:00:00' I know there are stuff such as insert, update, and delete triggers. But is there a way that i can set a time when that trigger should fire....other than using sql jobs Please anyone help me. Thanks, Morgs

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      MorgSim wrote:

      But is there a way that i can set a time when that trigger should fire

      Not as far as I know. A trigger, by definition, is activated by an event, how are you going to activate the trigger if you don't use a job. You are trying to use the wrong tool for the wrong job. Just use a procedure and call it using a job like it is designed to!

      Never underestimate the power of human stupidity RAH

      M 1 Reply Last reply
      0
      • M Morgs Morgan

        Hi guys, I would like to create a trigger that must execute at a certain time.e.g. '2010-06-08 12:00:00' I know there are stuff such as insert, update, and delete triggers. But is there a way that i can set a time when that trigger should fire....other than using sql jobs Please anyone help me. Thanks, Morgs

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        You do not need a trigger here. All you need is a job that executes a stored procedure or a set of queries at the mentioned time.

        1 Reply Last reply
        0
        • M Mycroft Holmes

          MorgSim wrote:

          But is there a way that i can set a time when that trigger should fire

          Not as far as I know. A trigger, by definition, is activated by an event, how are you going to activate the trigger if you don't use a job. You are trying to use the wrong tool for the wrong job. Just use a procedure and call it using a job like it is designed to!

          Never underestimate the power of human stupidity RAH

          M Offline
          M Offline
          Morgs Morgan
          wrote on last edited by
          #4

          Ok thanks guys, i was also actually not sure about this. i will try some other logic instead

          1 Reply Last reply
          0
          • M Morgs Morgan

            Hi guys, I would like to create a trigger that must execute at a certain time.e.g. '2010-06-08 12:00:00' I know there are stuff such as insert, update, and delete triggers. But is there a way that i can set a time when that trigger should fire....other than using sql jobs Please anyone help me. Thanks, Morgs

            T Offline
            T Offline
            Tim Carmichael
            wrote on last edited by
            #5

            If you don't want to use a SQL job, use a scheduled task instead; it is executed outside of the control of the SQLServer Agent Service. Not necessarily pretty, but provides a different level of control. Tim

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups