![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | List out SQL Jobs? Is there a way to hook into Enterpise Manager and list out all sql jobs and/or their runtimes? |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | RE: List out SQL Jobs? You can access the jobs through SMO. I don't have an example available at the moment. I try and post one soon -- Richard Siddaway All scripts are supplied "as is" and with no warranty PowerShell MVP Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "akcorr" wrote:
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||
| Guest | Re: List out SQL Jobs? On Apr 15, 1:42*pm, akcorr <akc...@xxxxxx> wrote:
servers(instances) to check # ####################################################################################### # # Author: Stephen Merkel # Date: 01/09/2007 # Script: info.ps1 # Purpose: Shows enabled jobs whose last run outcome is Failed # # # Parameters: server name(s) # ######################################################################################## [void] [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo"); [void] [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum"); [void] [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo"); $smo = "Microsoft.SqlServer.Management.Smo." if ( $Args.length -eq 0) {$a=("server1","server2") } else {$a=$args} get-date -format g foreach ($el in $a) { $srv = new-object ($smo + 'server') $el $el.toupper() $srv.jobserver.jobs | where-object {$_.lastrunoutcome -eq "Failed" - and $_.isenabled -eq $TRUE} | format-table name,lastrunoutcome,lastrundate -autosize {"------------------------------------------------------------------------------"} } | ||||||||||||
My System Specs![]() | |||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BITS Jobs | Ash | Vista General | 1 | 04-01-2008 12:50 AM |
| Ubuntu Jobs for Alias | Mrs. Happy | Vista General | 6 | 07-16-2007 09:43 PM |
| Gates & Jobs Video from All Things D5/on 6/30/07 | Chad Harris | Vista General | 1 | 06-03-2007 11:03 PM |
| Jobs stole my philosophy on DRM | Dale | Vista General | 10 | 02-10-2007 11:24 PM |
| Jobs & Gates Speak Out Against DRM | Robbie | Vista General | 9 | 02-07-2007 10:19 AM |