Linking sharepoint to a SQL Server job notification. Possible?

JohnnyMCE

Member
Apr 13, 2006
141
0
0
So I am kicking around an idea at work and before I bring it up to my boss and the sharepoint folks I want to know if it is even feasible.

Here is the scenario. We have some SQL server jobs that run nightly that load data in the database. At the moment in the morning if the jobs succeed we receive an e-mail stating this then we have to log into the sharepoint site and update the status of the load manually. Basically just stating the date and time the load completed and if it did.

Is there a way I can insert some code into the sharepoint site that will update automatically based upon a trigger of some sort from SQL Server?

Not sure if this is possible but any thoughts or links would be greatly appreciated.
 

bunker

Lifer
Apr 23, 2001
10,578
0
71
If all your jobs are in a list in SharePoint you could use SSIS to get the status and run a Powershell script to update the list.

Don't ask me how to do it though, I just went and asked my Sharepoint guy for you
 

KB

Diamond Member
Nov 8, 1999
5,401
386
126
SQL Server code can call just about any other code out there, .Net, batch files, powershell, so this is entirely doable. The problems are that you may need enable these features in SQL Server, also debugging t-sql or SSIS isn't a lot of fun. If I were given this task I would create a query to fetch the completed times of each job from the MSDB (sysjob, sysjobhistory tables) database in sql server. I would then have sharepoint fetch this data into a spreadsheet or list.

Here is a sample script to get you started.
http://weblogs.sqlteam.com/tarad/archive/2009/06/10/SQL-Server-Script-to-Display-Job-History.aspx
 

leeland

Diamond Member
Dec 12, 2000
3,659
0
76
depending on the complexity of the process involved with updating this sharepoint site I would conceive you could do something along the lines of adding a step to your job.

The step could back end update the site in sharepoint...if this is as simple as flipping a flag it might not be that big of a deal.

To find out where the update is occurring when you are in the site, you could run a profile trace on the sql server to capture the t-sql commands that are occurring when you are making the changes on the front end.

Is this supported...probably not
Is this a good idea...probably not

However if the risk is deemed to be low and the update simple then I wouldn't totally crap on the idea.
 

Gunslinger08

Lifer
Nov 18, 2001
13,234
2
81
I know this is way after the fact, but you can do it fairly simply. Add a new email address in Exchange for SharePoint to receive updates on. Have your nightly job also send the email to this address. You can mail enable lists in SharePoint. Do that for the status list and write/attach a new SPEmailEventReceiver that parses the email body and updates the list appropriately. This approach removes the need for and SQL changes such as registering .net assemblies and such, for triggers and procedures to call.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |