Showing posts with label ran. Show all posts
Showing posts with label ran. Show all posts

Wednesday, March 21, 2012

Listing jobs that ran last hour

Hello...
I want to write a query that will list for me the name, date and time of
jobs that ran from the previous hour. I am using SQL Server 2000.
Thank you,
Brett>> ...a query that will list for me the name, date and time of jobs that ran
The data you are looking for is available in msdb..sysjobhistory table. You
can do:
SELECT job_name, run_time
FROM ( SELECT CAST( CAST( run_date AS CHAR( 9 ) ) +
STUFF( STUFF( RIGHT( REPLICATE( '0', 6 ) +
CAST( run_time AS VARCHAR ), 6 ) , 3, 0 , ':' ) , 6, 0 ,
':' )
AS DATETIME ),
( SELECT name
FROM msdb..sysjobs s2
WHERE s2.job_id = s1.job_id )
FROM msdb..sysjobhistory s1 ) D ( run_time, job_name )
WHERE run_time >= DATEADD( hour, -1, CURRENT_TIMESTAMP ) ;
Perhaps, someone else might post a more simplified string format routine.
Anith

Monday, March 12, 2012

List of what the server is running

I am working with the web service here, is there any way to get a list back
of all the current reports being ran? thanks!On Mar 2, 11:25 am, "Smokey Grindel" <nos...@.nospam.com> wrote:
> I am working with the web service here, is there any way to get a list back
> of all the current reports being ran? thanks!
I don't have the link but if you check the microsoft report packs I
beleive there are some reports for this...
Cheers,
Ben|||Take a look at the ReportService2005 Web service... There is a job class
that I think does what you wish.
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Smokey Grindel" wrote:
> I am working with the web service here, is there any way to get a list back
> of all the current reports being ran? thanks!
>
>|||Just want to verify a "job" is not just a scheduled one but any report or
task that the report server is currently running correct? thanks!
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:DEF182B0-BEEE-4F7B-B597-580C91778982@.microsoft.com...
> Take a look at the ReportService2005 Web service... There is a job class
> that I think does what you wish.
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "Smokey Grindel" wrote:
>> I am working with the web service here, is there any way to get a list
>> back
>> of all the current reports being ran? thanks!
>>