• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 59
  • Last Modified:

find out job steps

hi,

I just get an email about a SQL job failure:

SQLAgent - TSQL JobStep (Job 0xB37A49A1542D364BA1637B2AC21C6236 : Step 1)

how can I find that job out ? I can't find that using that number.
0
marrowyung
Asked:
marrowyung
  • 12
  • 8
  • 2
  • +1
3 Solutions
 
Barry CunneyCommented:
Hi marrowyung,
Please try the following:

DECLARE @Job uniqueidentifier

SET @Job = 'B37A49A1-542D-364B-A163-7B2AC21C6236' -- Job 0xB37A49A1542D364BA1637B2AC21C6236

SELECT 
j.job_id
,j.name
,js.step_name
,js.command
,js.last_run_date 
FROM sysjobs j
left join sysjobsteps js on js.job_id = j.job_id
where j.job_id = @job

Open in new window

0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
In SSMS, navigate to your server > SQL Server Agent > Jobs, find the job in question,  right-click: View History, and hit the Export button to save the history to a text file.

Then in a decent text editor open the text file.  The error message will still be jibberish-riffic, but at least there will be a 'Source:' and 'Description:' with the error location and message.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Also ... Double-click to open the job, click on Steps in the left nav, eyeball where job step TSQL JobStep is, click on that, hit the Edit button, then in the resulting popup the General Tab > Package textbox will tell you the SSIS package name and location that threw the error.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Vitor MontalvãoMSSQL Senior EngineerCommented:
marrowyung, do you still need help with this question?
0
 
marrowyungAuthor Commented:
St. Jimbo,

"In SSMS, navigate to your server > SQL Server Agent > Jobs, find the job in question,  right-click: View History, and hit the Export button to save the history to a text file. "

the problem right now is this number is not show as the name, so I can't find where it is

"Then in a decent text editor open the text file"

what is that ?
0
 
marrowyungAuthor Commented:
Barry Cunney,

"SET @Job = 'B37A49A1-542D-364B-A163-7B2AC21C6236' -- Job 0xB37A49A1542D364BA1637B2AC21C6236"

you just remove the 0x ?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
"Then in a decent text editor open the text file"

 what is that ?
I guess anything better than Notepad :)


you just remove the 0x ?
Why not give a try with both so you can see by yourself why '0x' has been removed? ;)
0
 
marrowyungAuthor Commented:
"Why not give a try with both so you can see by yourself why '0x' has been removed? ;)"

I knew, but without knowing why I think it make sense to clarify what I see.

but tks for that victor, you always proactive. I like that.

I really can't see that job even I use the SQL job filter from SSMS.

the point here is, I can't find the job, that's it.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
I really can't see that job even I use the SQL job filter from SSMS.
Can you post what returns from the following query?
USE msdb
GO

SELECT name, job_id 
FROM sysjobs 

Open in new window

0
 
marrowyungAuthor Commented:
so just focus on job id?
as name and job id diff anyway.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
This is only for sanity check.
Can you provide the requested information?
0
 
marrowyungAuthor Commented:
sth like this:

001EF15F-2C08-4FEB-9C57-777C927D5793      4A02DBD6-498A-44EF-A426-2B1C60E04834
0025044A-EC14-4EF9-BAAF-AA42A2840922      699129CC-58AA-42CA-AD6E-07D91F3E5B3A
00391440-42D0-4FBB-93FB-9861B7931F39      90BE2193-67AB-44CB-857E-4968056A0A31
004421B2-79B1-45A4-AFA9-01553A048CF5      4788A2BA-CDBD-40B7-8D6C-C96CFAE45E8F
004DACFE-534A-489B-8F82-0BEBFFDE2F2D      85F2A4A0-055F-4613-98DF-8C26AE8DA104
0084244E-A427-46D6-BA0D-95F768836F02      6191EEAA-DF9F-4564-AF7B-14EAE215665B
0097C661-ED0E-42CA-84EF-CAD60793D80E      ABCC002E-7B24-4338-88AD-EF68D432A0F0
00E8652A-4CCF-415B-A034-3ACE91FE86F5      1EBE6B62-CFFC-4F0E-8331-27F4E13ECAC3
0124C1B3-812E-4352-B16C-AF191C4145AA      624F027C-B323-4429-8E66-0C1E76D378EC
01316601-797B-4FBE-BB86-749CBCEC8DFF      AABEBF5C-AA64-44B3-9BA8-962FECA70400
0185EF67-75B3-4384-8E64-FAC5F556B481      3C615A10-4AB9-4067-9505-107A4BC51864
01AC28BB-55AA-4C75-808B-8D632A765B35      8940907C-F8C3-42EA-9933-35CF3AD4CC3C
01BED4DE-EADE-4E6E-851A-8797620FA330      C636941B-82EE-420A-81D4-B2A0EB99D6E0
01D63584-BB49-4E97-B468-05A1F5909CDF      1678DD21-CE80-445D-B5B1-2E135057B9AC
01F86704-2DC5-4FF5-B3E5-3DE986232F5B      785A83C7-F040-4BCA-81C3-9F811DAE7DBC
020C3F03-C3EE-424E-8705-B2F987A6FCA8      8D1932F3-11A3-48EF-9E0F-CFD594DE6387
02888B3E-1634-4ACA-9015-A56B1D89EEF2      F93FA980-60E3-460A-8D40-C4820FB3494C
028B9D3B-817C-4416-9238-3B4297A2BF95      A06F4B1B-AB62-447C-9CE1-42B91D585B48
02BDCFBB-9D77-4F1B-AB97-E8106D197987      C4BBF975-C0EA-43B0-894D-A95F4AE60DD3
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Are you sure the job is from this SQL Server instance?
Any chance that job belongs to another SQL Server?
0
 
marrowyungAuthor Commented:
no.. I am sure.
0
 
marrowyungAuthor Commented:
as  I said,very hard to find out which job it belongs to .
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
You still receiving the same email with the same job id?
0
 
marrowyungAuthor Commented:
no. I think I have to learn how to work out the SQL job. so I come back for that.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
If you're not receiving more emails and you can't find the job my guess is that job has been deleted.
0
 
Barry CunneyCommented:
Hi marrowyung,
In your very first post, you mentioned that you received this Job ID in an e-mail.
If possible, please post up a print screen of this e-mail.

Thank you
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
marrowyung, how's this going?
0
 
marrowyungAuthor Commented:
hi,

forget about that, I think I deleted the message and will come back again for that.
0
 
marrowyungAuthor Commented:
tks al.
0
 
marrowyungAuthor Commented:
hi,

I get one more:

"with application name 'SQLAgent - TSQL JobStep (Job 0xB3CB0A4853CE91479D8138B7A261CBC4 : Step 1)' by user"

but I can't  get it return on what SQL job it is by using:

DECLARE @Job uniqueidentifier

SET @Job = 'B3CB0A4853CE91479D8138B7A261CBC4' 

SELECT 
j.job_id
,j.name
,js.step_name
,js.command
,js.last_run_date 
FROM sysjobs j
left join sysjobsteps js on js.job_id = j.job_id
where j.job_id = @job

Open in new window


it said :

Msg 8169, Level 16, State 2, Line 3
Conversion failed when converting from a character string to uniqueidentifier.

Open in new window

0
 
marrowyungAuthor Commented:
it seems this script can ?


select * from msdb..sysjobs where job_id =  0xB3CB0A4853CE91479D8138B7A261CBC4
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 12
  • 8
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now