Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Match sysprocesses to a SQL Job

Status
Not open for further replies.

DBAWinnipeg

Programmer
Apr 14, 2004
173
0
0
CA
How do I tell from this:

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


What actual job is running?



Thanks in advance!!!

Colin in da 'Peg :)
 
Check msdb database - tables sysjobs, sysjobsteps and eventually sysjobhistory (column job_id).

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Job_ID does not match the format:
0x8501EDDEF96F7942A6DD6573CF5D9874


Job ID is in this type of format:
B6D27F74-EA05-491B-99FF-07213CE10B24


So I'm not where where you are going with this? do you have script?


Thanks in advance!!!

Colin in da 'Peg :)
 
How can I convert
0x8501EDDEF96F7942A6DD6573CF5D9874

into the matching job id that looks like this:
B6D27F74-EA05-491B-99FF-07213CE10B24


Thanks in advance!!!

Colin in da 'Peg :)
 
select *
from msdb..sysjobs
where upper(convert(varchar(34), master.dbo.fn_varbintohexstr(convert(varbinary(16), job_id)))) ='0x8501EDDEF96F7942A6DD6573CF5D9874'



Got it

Thanks in advance!!!

Colin in da 'Peg :)
 
GOLD STAR for me :)

Thanks in advance!!!

Colin in da 'Peg :)
 
what about select convert(binary,job_id),job_id from dbo.sysjobs

“I sense many useless updates in you... Useless updates lead to defragmentation... Defragmentation leads to downtime...Downtime leads to suffering..Defragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top