Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Trigger/Jobs that execute on data import??
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

United Kingdom
32 Posts

Posted - 03/08/2013 :  06:04:49  Show Profile  Reply with Quote
Hi, I need to set up some automated transactions in SQL server, and am unsure of how to go about doing what I need to, but I will explain the basis of it here, and hoepfully someone can explain how I would get the system I want put in place....

Basically, I have data that is imported into a database from quite a few other databases at a set time every day, I need to set something up (some kind of trigger or something) that will execute a query (probably need to make this a stored procedure) once all of the data has finished importing (the time it takes to import the data will vary daily, so i'm not sure how the 'trigger' would be aware when an import has finished), once the first query has finished funning after the import, then this needs to trigger a second query, and the second query then triggers a third before all the data has been processed. The whole system kicks off again at the next import...

How can I get this set up, I'm guessing its a mixture of 'triggers' (not sure if thats the right word) and stored procedures, maybe 'jobs'?

Any info/input would be great, thanks guys

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 03/08/2013 :  06:22:50  Show Profile  Reply with Quote
you just require a single job created in sql server agent for all these. Make your current import process as a step inside this job. Add the next consecutive step as your first query, next as second query etc in same sequential order. Now schedule the job according to your convenience and it will get executed each time by starting off import process then executing your queries one after the other in the same order you set it up.

SQL Server MVP

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000