Solved

SSIS package for notification of changes

Posted on 2012-03-14
3
240 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 39

Expert Comment

by:lcohan
Comment Utility
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
Comment Utility
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 39

Accepted Solution

by:
lcohan earned 500 total points
Comment Utility
"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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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.
Viewers will learn how the fundamental information of how to create a table.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now