473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Getting SQL Job Status

I have .NET apps that use information that is in Microsoft SQL Server and is
updated every night by SQL Server jobs. Is there a way to check the status
of a SQL Server job in C# to make sure the job was successful. I want to be
able notify users of a failure so that no one uses incorrect information.

Thank you for any assistance,
Adam
Nov 16 '05 #1
2 5776
ACFalcon,

I'm not that familiar with jobs in SQL server, but since everything is
stored in tables in the server, perhaps you can query the system tables
themselves to check on the status?

If not, then you probably can find out the job status through the
objects exposed by the SQLDMO COM component (which you would have to use COM
interop to access).

Ahh, here we go. Check out the system stored procedure "sp_help_job".
It should give you all the information you want.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ACFalcon" <AC******@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
I have .NET apps that use information that is in Microsoft SQL Server and
is
updated every night by SQL Server jobs. Is there a way to check the
status
of a SQL Server job in C# to make sure the job was successful. I want to
be
able notify users of a failure so that no one uses incorrect information.

Thank you for any assistance,
Adam

Nov 16 '05 #2
HI ACFalcom:

The system stored proc sp_help_jobhistory lets you query and filter
the job information.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 13 Oct 2004 08:19:03 -0700, "ACFalcon"
<AC******@discussions.microsoft.com> wrote:
I have .NET apps that use information that is in Microsoft SQL Server and is
updated every night by SQL Server jobs. Is there a way to check the status
of a SQL Server job in C# to make sure the job was successful. I want to be
able notify users of a failure so that no one uses incorrect information.

Thank you for any assistance,
Adam


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike C | last post by:
First of all, I am a complete newbie to Python, but have been impressed with how easy the language has been to pick up. I am trying to write a script that checks to see if the web / application...
3
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously...
3
by: daveyand | last post by:
hey, I know in the new browsers you're not able to change the value of the status bar. Which is fair enough, i understand why and agree. Although, i cant seem to get the value of the status...
3
by: mike | last post by:
Hello, I am new to XPATH and am having a hard time selecting some nodes. I want to select all the record nodes where Status = 'Unprocessed' or 'Queued' (that part I can get) but additionally I...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
10
by: jonathan184 | last post by:
Hi I tried getting this to work through dreamweaver but it did not. So i found a n example on the internet , i followed everything exactly the search script does not work. Could somebody help me...
10
by: crazycooter | last post by:
I found an old thread on this (http://groups.google.com/group/alt.php/ browse_thread/thread/751edb9c723316c4/ea9bf92a9c6b807c?lnk=gst&q=mail() +duplicate&rnum=7#ea9bf92a9c6b807c), but there didnt...
4
by: Andrew May | last post by:
This is only my first AJAX based application so this may be a trivial question but I cannot find any way of getting at the data I want. So, I have an XML file of the form: <data>...
5
by: g0uki | last post by:
Hi all, i hope you can help, I'm having some trouble getting all the data from a file, well just the date and time entries. I'll be doing operations on the data so would like to store it within...
45
by: angelicdevil | last post by:
i have 2 tables 1 is status_type with field name status and other is users with field username and status now i want that the first listbox lists all status from status type ( this i have achieved...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.