Author |
Topic |
jmr
Starting Member
5 Posts |
Posted - 2006-03-19 : 20:29:43
|
I am new to sql server, I need to be able to have a trigger or something trigger an event to update some tables every day at let say 12:00 pm. The trigger will then check a table for the end date and if it is = then begin to move information around. Does anybody know how to do this, or if it is possible. I have not been able to find anywere were I can do this. I don't know triggers very well and am not sure if this can be done with that.Please Help!!!! |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-03-19 : 20:33:46
|
You don't need trigger. Trigger is executed on the event of INSERT, UPDATE or DELETE action on a table.You can perform what you required in a Stored Procedure and have that stored procedure scheduled it to run a every day at 12:00 PM. KHChoice is an illusion, created between those with power, and those without.Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant |
|
|
jmr
Starting Member
5 Posts |
Posted - 2006-03-19 : 20:38:47
|
How do I schedule this to run every day? Do I do it threw the Sql agent jobs, if so how do I do it when my server is hosted on another site? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-03-19 : 20:43:55
|
"How do I schedule this to run every day?"You can scheduled it via Enterprise Manager."how do I do it when my server is hosted on another site?"Register the remote server in your local Enterprise Manager and managed it from your local KHChoice is an illusion, created between those with power, and those without.Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant |
|
|
jmr
Starting Member
5 Posts |
Posted - 2006-03-19 : 20:48:32
|
Do I schedule it with the Sql Server Agent? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-03-19 : 20:55:24
|
yes. Management - SQL Server Agent - Jobs KHChoice is an illusion, created between those with power, and those without.Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant |
|
|
jmr
Starting Member
5 Posts |
Posted - 2006-03-19 : 21:01:48
|
Thank you,How would I call a stored Procedure named "Daily Check". Should I use the activeX Script for the step type and use Visual basics to call the stored procedure? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-03-19 : 21:16:47
|
When you create a new job, under the Steps tab page, use TSQL and enter under commandexec your_stored_procedure KHChoice is an illusion, created between those with power, and those without.Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant |
|
|
jmr
Starting Member
5 Posts |
Posted - 2006-03-19 : 21:27:29
|
Thanks!I will try that |
|
|
|