| Author |
Topic |
|
benking9987
Posting Yak Master
124 Posts |
Posted - 2010-06-10 : 17:50:19
|
| Our backend database solution is SQL, but the front end that users interact with is MS Access. Works great BTW and we love it. However, I'm encountering an issue I'd like some input on.I am creating a SQL Agent job that has about 18 steps using a combination of SSIS import/export and T-SQL statements. I can get all of the functionality to work just fine, but I want a way to trigger the job OUTSIDE of the SQL Management Studio. Since my users likely don't even know SQL exists, I don't want them to go into the Management Studio to fire off my job that processes the orders they need to look at. Does anyone know of a way to tell SQL to start the job based on something we can tell it from the outside? Maybe based on an insert function to a certain table?Thanks in advance for your help. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
benking9987
Posting Yak Master
124 Posts |
Posted - 2010-06-11 : 18:06:40
|
| Sounds like this is what I want I'm thinking. So, I just build the Trigger to be called whenever I insert a new record onto a certain table, using the sp_start_job syntax? Am I understanding this correctly? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
benking9987
Posting Yak Master
124 Posts |
Posted - 2010-06-14 : 18:53:40
|
| Okay, so I'm a little embarrased, but I don't have any experience creating triggers, so the syntax is a little bit heinous for me. I am generally pretty good at adapting existing syntax to my needs, but have a hard time generating it out of nothing.Basically, I want to run a SQL Server Agent job called "AZ_ImportOrders" every time there is an insert on table "AZ_Order_ImportTrigger". I know I need to create the trigger on that table, but I'm not sure where to start after:CREATE TRIGGER.....Sorry I'm so helpless. Any ideas? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
benking9987
Posting Yak Master
124 Posts |
Posted - 2010-06-16 : 12:08:34
|
| Not sure I understand what you mean X002548, but I note the terrible feeling you have for MS Access. I know, its certainly not a fantastic solution, but its worked for us as our resources are limited both in terms of money to put into systems that do more than we need and in terms of development capability. For us, its a simple financial decision and so far it has paid dividends :)Thank you Tkizer. I did look at BOL to begin with, but got more confused as they list pretty much all the syntax options out there. Triggers are certainly not an area that I have much experience in, but now I'll be better prepared for next time. Thanks again. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|