Friday, February 10, 2012

Check SQL Agent History for additional details

Where do I check for the additional details when the job fails? This is
from both the msdb.dbo.sysjobhistory table and the SSMS Log File Viewer. On
a related note, is there a way to determine how many records were affected
by a job without modifying the stored procedure that was called?
Thanks.
Message
Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER.
Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
50000). The step failed.I don't know where the logs are for SQL Server, but some of the stuff
gets posted into the server's event logs which can be seen with the
event log viewer on the server:
start->programs->administrative tools->event viewer|||Open up SSMS and go to SQL Server Agent node and expand Jobs, right click on
your job and select View History.
--
Ekrem Önsoy
<a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
> Where do I check for the additional details when the job fails? This is
> from both the msdb.dbo.sysjobhistory table and the SSMS Log File Viewer.
> On a related note, is there a way to determine how many records were
> affected by a job without modifying the stored procedure that was called?
> Thanks.
> Message
> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER.
> Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
> 50000). The step failed.
>|||Thanks for the reply, that is where I got that message from re: the SSMS Log
File Viewer
"Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
news:580D43DC-2CDF-49D0-AB8D-B5D005CFBB42@.microsoft.com...
> Open up SSMS and go to SQL Server Agent node and expand Jobs, right click
> on your job and select View History.
> --
> Ekrem Önsoy
>
> <a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
>> Where do I check for the additional details when the job fails? This is
>> from both the msdb.dbo.sysjobhistory table and the SSMS Log File Viewer.
>> On a related note, is there a way to determine how many records were
>> affected by a job without modifying the stored procedure that was called?
>> Thanks.
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER.
>> Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
>> 50000). The step failed.
>|||Did you navigate into the details for the job step?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<a> wrote in message news:eB$l6BEDIHA.4712@.TK2MSFTNGP04.phx.gbl...
> Thanks for the reply, that is where I got that message from re: the SSMS Log File Viewer
> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
> news:580D43DC-2CDF-49D0-AB8D-B5D005CFBB42@.microsoft.com...
>> Open up SSMS and go to SQL Server Agent node and expand Jobs, right click on your job and select
>> View History.
>> --
>> Ekrem Önsoy
>>
>> <a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
>> Where do I check for the additional details when the job fails? This is from both the
>> msdb.dbo.sysjobhistory table and the SSMS Log File Viewer. On a related note, is there a way to
>> determine how many records were affected by a job without modifying the stored procedure that
>> was called?
>> Thanks.
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER. Check SQL Agent History
>> for additional details. [SQLSTATE 42000] (Error 50000). The step failed.
>>
>|||Yes I should have mentioned that was the details for the job step:
Date 10/11/2007 4:00:00 PM
Log Job History (DBA Scheduled Tasks - SQL Agent Failure Notifications)
Step ID 1
Server SERVERR
Job Name DBA Scheduled Tasks - SQL Agent Failure Notifications
Step Name Notify via MOM when SQL Agent Jobs Fail
Duration 00:00:01
Sql Severity 16
Sql Message ID 50000
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVERR.
Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
50000). The step failed.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:751A094C-8F05-476B-920D-F1CAD8F1F8F4@.microsoft.com...
> Did you navigate into the details for the job step?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> <a> wrote in message news:eB$l6BEDIHA.4712@.TK2MSFTNGP04.phx.gbl...
>> Thanks for the reply, that is where I got that message from re: the SSMS
>> Log File Viewer
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:580D43DC-2CDF-49D0-AB8D-B5D005CFBB42@.microsoft.com...
>> Open up SSMS and go to SQL Server Agent node and expand Jobs, right
>> click on your job and select View History.
>> --
>> Ekrem Önsoy
>>
>> <a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
>> Where do I check for the additional details when the job fails? This
>> is from both the msdb.dbo.sysjobhistory table and the SSMS Log File
>> Viewer. On a related note, is there a way to determine how many records
>> were affected by a job without modifying the stored procedure that was
>> called?
>> Thanks.
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER.
>> Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
>> 50000). The step failed.
>>
>>
>|||Did you check Event Viewer for any clue?
--
Ekrem Önsoy
<a> wrote in message news:uJXuKDFDIHA.4196@.TK2MSFTNGP04.phx.gbl...
> Yes I should have mentioned that was the details for the job step:
> Date 10/11/2007 4:00:00 PM
> Log Job History (DBA Scheduled Tasks - SQL Agent Failure Notifications)
> Step ID 1
> Server SERVERR
> Job Name DBA Scheduled Tasks - SQL Agent Failure Notifications
> Step Name Notify via MOM when SQL Agent Jobs Fail
> Duration 00:00:01
> Sql Severity 16
> Sql Message ID 50000
> Operator Emailed
> Operator Net sent
> Operator Paged
> Retries Attempted 0
> Message
> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVERR.
> Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
> 50000). The step failed.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:751A094C-8F05-476B-920D-F1CAD8F1F8F4@.microsoft.com...
>> Did you navigate into the details for the job step?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> <a> wrote in message news:eB$l6BEDIHA.4712@.TK2MSFTNGP04.phx.gbl...
>> Thanks for the reply, that is where I got that message from re: the SSMS
>> Log File Viewer
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:580D43DC-2CDF-49D0-AB8D-B5D005CFBB42@.microsoft.com...
>> Open up SSMS and go to SQL Server Agent node and expand Jobs, right
>> click on your job and select View History.
>> --
>> Ekrem Önsoy
>>
>> <a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
>> Where do I check for the additional details when the job fails? This
>> is from both the msdb.dbo.sysjobhistory table and the SSMS Log File
>> Viewer. On a related note, is there a way to determine how many
>> records were affected by a job without modifying the stored procedure
>> that was called?
>> Thanks.
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER.
>> Check SQL Agent History for additional details. [SQLSTATE 42000]
>> (Error 50000). The step failed.
>>
>>
>|||From event viewer:
Error: 50000 Severity: 16 State: 1 1 SQL Agent jobs have failed on Server
Server. Check SQL Agent History for additional details.
"Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
news:A62F0127-7F07-4EB1-A4E3-F482D55C8D85@.microsoft.com...
> Did you check Event Viewer for any clue?
> --
> Ekrem Önsoy
>
> <a> wrote in message news:uJXuKDFDIHA.4196@.TK2MSFTNGP04.phx.gbl...
>> Yes I should have mentioned that was the details for the job step:
>> Date 10/11/2007 4:00:00 PM
>> Log Job History (DBA Scheduled Tasks - SQL Agent Failure Notifications)
>> Step ID 1
>> Server SERVERR
>> Job Name DBA Scheduled Tasks - SQL Agent Failure Notifications
>> Step Name Notify via MOM when SQL Agent Jobs Fail
>> Duration 00:00:01
>> Sql Severity 16
>> Sql Message ID 50000
>> Operator Emailed
>> Operator Net sent
>> Operator Paged
>> Retries Attempted 0
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVERR.
>> Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
>> 50000). The step failed.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:751A094C-8F05-476B-920D-F1CAD8F1F8F4@.microsoft.com...
>> Did you navigate into the details for the job step?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> <a> wrote in message news:eB$l6BEDIHA.4712@.TK2MSFTNGP04.phx.gbl...
>> Thanks for the reply, that is where I got that message from re: the
>> SSMS Log File Viewer
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:580D43DC-2CDF-49D0-AB8D-B5D005CFBB42@.microsoft.com...
>> Open up SSMS and go to SQL Server Agent node and expand Jobs, right
>> click on your job and select View History.
>> --
>> Ekrem Önsoy
>>
>> <a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
>> Where do I check for the additional details when the job fails? This
>> is from both the msdb.dbo.sysjobhistory table and the SSMS Log File
>> Viewer. On a related note, is there a way to determine how many
>> records were affected by a job without modifying the stored procedure
>> that was called?
>> Thanks.
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server
>> SERVER. Check SQL Agent History for additional details. [SQLSTATE
>> 42000] (Error 50000). The step failed.
>>
>>
>>
>|||I guess you need to investigate what this job does and how to interpret the output from the job
through the one who wrote the job. The output states some information for you:
> Sql Severity 16
> Sql Message ID 50000
Above show you that the TSQL code executed by the job step returned error 50000 and severity 16. The
some text from whatever it was you executed:
> Operator Emailed
> Operator Net sent
> Operator Paged
> Retries Attempted 0
Above is probably the error message from the executed TSQL code. The name of the job step:
> Step Name Notify via MOM when SQL Agent Jobs Fail
suggests that it has to do with MOM, so you probably want to read MOM documentation and/or ask in a
MOM group. A wild guess from my part is that whatever it is you execute tried to do a NET SEND which
fails (messagenr service is disabled by default nowadays).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<a> wrote in message news:uJXuKDFDIHA.4196@.TK2MSFTNGP04.phx.gbl...
> Yes I should have mentioned that was the details for the job step:
> Date 10/11/2007 4:00:00 PM
> Log Job History (DBA Scheduled Tasks - SQL Agent Failure Notifications)
> Step ID 1
> Server SERVERR
> Job Name DBA Scheduled Tasks - SQL Agent Failure Notifications
> Step Name Notify via MOM when SQL Agent Jobs Fail
> Duration 00:00:01
> Sql Severity 16
> Sql Message ID 50000
> Operator Emailed
> Operator Net sent
> Operator Paged
> Retries Attempted 0
> Message
> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVERR. Check SQL Agent History
> for additional details. [SQLSTATE 42000] (Error 50000). The step failed.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:751A094C-8F05-476B-920D-F1CAD8F1F8F4@.microsoft.com...
>> Did you navigate into the details for the job step?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> <a> wrote in message news:eB$l6BEDIHA.4712@.TK2MSFTNGP04.phx.gbl...
>> Thanks for the reply, that is where I got that message from re: the SSMS Log File Viewer
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:580D43DC-2CDF-49D0-AB8D-B5D005CFBB42@.microsoft.com...
>> Open up SSMS and go to SQL Server Agent node and expand Jobs, right click on your job and
>> select View History.
>> --
>> Ekrem Önsoy
>>
>> <a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
>> Where do I check for the additional details when the job fails? This is from both the
>> msdb.dbo.sysjobhistory table and the SSMS Log File Viewer. On a related note, is there a way
>> to determine how many records were affected by a job without modifying the stored procedure
>> that was called?
>> Thanks.
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER. Check SQL Agent History
>> for additional details. [SQLSTATE 42000] (Error 50000). The step failed.
>>
>>
>|||Thanks Tibor. This is just a sample error, I would think the details would
be in the msdb database somewhere. I am working on a report to query the
jobjistory tables for success and failure, and provide the details on the
job so even if it says success, I need further verification. For instance
if a job runs an SSIS package from the command line and the package fails,
the job still reports success. I can find absolutely nothing on the web for
the phrase "Check SQL Agent history for additional details" and thought I
would try here.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:472E2179-D5A8-4D3A-8875-77EAA77FD0FF@.microsoft.com...
>I guess you need to investigate what this job does and how to interpret the
>output from the job through the one who wrote the job. The output states
>some information for you:
>> Sql Severity 16
>> Sql Message ID 50000
> Above show you that the TSQL code executed by the job step returned error
> 50000 and severity 16. The some text from whatever it was you executed:
>> Operator Emailed
>> Operator Net sent
>> Operator Paged
>> Retries Attempted 0
> Above is probably the error message from the executed TSQL code. The name
> of the job step:
>> Step Name Notify via MOM when SQL Agent Jobs Fail
> suggests that it has to do with MOM, so you probably want to read MOM
> documentation and/or ask in a MOM group. A wild guess from my part is that
> whatever it is you execute tried to do a NET SEND which fails (messagenr
> service is disabled by default nowadays).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> <a> wrote in message news:uJXuKDFDIHA.4196@.TK2MSFTNGP04.phx.gbl...
>> Yes I should have mentioned that was the details for the job step:
>> Date 10/11/2007 4:00:00 PM
>> Log Job History (DBA Scheduled Tasks - SQL Agent Failure Notifications)
>> Step ID 1
>> Server SERVERR
>> Job Name DBA Scheduled Tasks - SQL Agent Failure Notifications
>> Step Name Notify via MOM when SQL Agent Jobs Fail
>> Duration 00:00:01
>> Sql Severity 16
>> Sql Message ID 50000
>> Operator Emailed
>> Operator Net sent
>> Operator Paged
>> Retries Attempted 0
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVERR.
>> Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
>> 50000). The step failed.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:751A094C-8F05-476B-920D-F1CAD8F1F8F4@.microsoft.com...
>> Did you navigate into the details for the job step?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> <a> wrote in message news:eB$l6BEDIHA.4712@.TK2MSFTNGP04.phx.gbl...
>> Thanks for the reply, that is where I got that message from re: the
>> SSMS Log File Viewer
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:580D43DC-2CDF-49D0-AB8D-B5D005CFBB42@.microsoft.com...
>> Open up SSMS and go to SQL Server Agent node and expand Jobs, right
>> click on your job and select View History.
>> --
>> Ekrem Önsoy
>>
>> <a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
>> Where do I check for the additional details when the job fails? This
>> is from both the msdb.dbo.sysjobhistory table and the SSMS Log File
>> Viewer. On a related note, is there a way to determine how many
>> records were affected by a job without modifying the stored procedure
>> that was called?
>> Thanks.
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server
>> SERVER. Check SQL Agent History for additional details. [SQLSTATE
>> 42000] (Error 50000). The step failed.
>>
>>
>>
>|||This is a customer error, not a SQL Server agent error. Thanks for all the
replies.
<a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
> Where do I check for the additional details when the job fails? This is
> from both the msdb.dbo.sysjobhistory table and the SSMS Log File Viewer.
> On a related note, is there a way to determine how many records were
> affected by a job without modifying the stored procedure that was called?
> Thanks.
> Message
> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER.
> Check SQL Agent History for additional details. [SQLSTATE 42000] (Error
> 50000). The step failed.
>|||I see. I ran a Profiler trace when expanding jobhistory (incl details) in SSMS, and SSMS executes
msdb.dbo.sp_help_jobhistory. This in turn executes sp_help_jobhistory_full, in which you can see
what joins and tables it is using. It seems that both overall and also step details are in the
jobhistory table...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<a> wrote in message news:OOybpRODIHA.4228@.TK2MSFTNGP02.phx.gbl...
> Thanks Tibor. This is just a sample error, I would think the details would be in the msdb
> database somewhere. I am working on a report to query the jobjistory tables for success and
> failure, and provide the details on the job so even if it says success, I need further
> verification. For instance if a job runs an SSIS package from the command line and the package
> fails, the job still reports success. I can find absolutely nothing on the web for the phrase
> "Check SQL Agent history for additional details" and thought I would try here.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:472E2179-D5A8-4D3A-8875-77EAA77FD0FF@.microsoft.com...
>>I guess you need to investigate what this job does and how to interpret the output from the job
>>through the one who wrote the job. The output states some information for you:
>> Sql Severity 16
>> Sql Message ID 50000
>> Above show you that the TSQL code executed by the job step returned error 50000 and severity 16.
>> The some text from whatever it was you executed:
>> Operator Emailed
>> Operator Net sent
>> Operator Paged
>> Retries Attempted 0
>> Above is probably the error message from the executed TSQL code. The name of the job step:
>> Step Name Notify via MOM when SQL Agent Jobs Fail
>> suggests that it has to do with MOM, so you probably want to read MOM documentation and/or ask in
>> a MOM group. A wild guess from my part is that whatever it is you execute tried to do a NET SEND
>> which fails (messagenr service is disabled by default nowadays).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> <a> wrote in message news:uJXuKDFDIHA.4196@.TK2MSFTNGP04.phx.gbl...
>> Yes I should have mentioned that was the details for the job step:
>> Date 10/11/2007 4:00:00 PM
>> Log Job History (DBA Scheduled Tasks - SQL Agent Failure Notifications)
>> Step ID 1
>> Server SERVERR
>> Job Name DBA Scheduled Tasks - SQL Agent Failure Notifications
>> Step Name Notify via MOM when SQL Agent Jobs Fail
>> Duration 00:00:01
>> Sql Severity 16
>> Sql Message ID 50000
>> Operator Emailed
>> Operator Net sent
>> Operator Paged
>> Retries Attempted 0
>> Message
>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVERR. Check SQL Agent History
>> for additional details. [SQLSTATE 42000] (Error 50000). The step failed.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
>> news:751A094C-8F05-476B-920D-F1CAD8F1F8F4@.microsoft.com...
>> Did you navigate into the details for the job step?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> <a> wrote in message news:eB$l6BEDIHA.4712@.TK2MSFTNGP04.phx.gbl...
>> Thanks for the reply, that is where I got that message from re: the SSMS Log File Viewer
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:580D43DC-2CDF-49D0-AB8D-B5D005CFBB42@.microsoft.com...
>> Open up SSMS and go to SQL Server Agent node and expand Jobs, right click on your job and
>> select View History.
>> --
>> Ekrem Önsoy
>>
>> <a> wrote in message news:uKFxvQDDIHA.972@.TK2MSFTNGP05.phx.gbl...
>>> Where do I check for the additional details when the job fails? This is from both the
>>> msdb.dbo.sysjobhistory table and the SSMS Log File Viewer. On a related note, is there a way
>>> to determine how many records were affected by a job without modifying the stored procedure
>>> that was called?
>>>
>>> Thanks.
>>>
>>> Message
>>> Executed as user: USER. 1 SQL Agent jobs have failed on Server SERVER. Check SQL Agent
>>> History for additional details. [SQLSTATE 42000] (Error 50000). The step failed.
>>>
>>
>>
>>
>

No comments:

Post a Comment