Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SSIS package for notification of changes

Posted on 2012-03-14
3
Medium Priority
?
257 Views
Last Modified: 2012-03-21
I am trying to creat an ssis package that compares 2 data sets and updates the 2nd data set to match the first.  Anytime there is a change to data set #2 send and email notification with the results.  I have done a little bit with integration services in the past and have gotten the send mail with results from the query to work fine but I want to add few other steps and lessen the email by only sending when the data has changed. I am attaching a small flow diagram of what I am looking for.  Please let me know what compents to use while creating the ssis.
ssis-order-compare.docx
0
Comment
Question by:notasgoodasyou
  • 2
3 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 37722060
Did you considered Trigger(s) for this matter instead of SSIS? At the end, your Data sits in SQL database tables and that's where you could trace the "change" in real time by using INSERT, UPDATE, and DELETE triggers to do whatever comparison you need then send email or any other action.
0
 

Author Comment

by:notasgoodasyou
ID: 37722129
I will look into the triggers but I dont know how it will work with 2 different databases.  I am running a query against our main sap db to get a data set ( any orders that are past due that we have stock on ) Initially i put this into a seperate table then rerun the query comparing results.  I want this to run every 30 minutes and send an email anytime new stock is added for a past due order or a new order goes past due that we have stock for.  I will look into triggers and see what I find but any help is appreciated.
0
 
LVL 40

Accepted Solution

by:
lcohan earned 1000 total points
ID: 37722178
"Initially i put this into a seperate table then rerun the query comparing results."

Are these two tables on the same SQL server in the same or separate DB's?
Im my opinion if you went this far already you could have a SQL Stored proc to compare the "seperate table" versus the "other" table or whatever data set (view?) you mean and if different send an email. Its easy to do all these from SQL code inside a stored proc - right?
Then all you need is a scheduled job to run every 30 minutes or so to
1. truncate/populate that "seperate table " from SAP db.
2. run this SQL stored proc to compare the 2 data sets and if different send the email.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question