sp_sjobdrop  sp_sjobcontrol

Chapter 5: Command Reference

sp_sjobhelp

Description

Generates a list or report about all the scheduled jobs, jobs, or running jobs that are visible to the caller, or about a restricted set based on the name and the option values.�

Syntax

sp_sjobhelp @name=’...’, @option=’...’

Parameters

name

The name or ID of the scheduled job, a job, or a runid. The @name argument restricts the scope to a single scheduled job, all scheduled jobs using a particular job, or a single run of a scheduled job. By default, @name is the name ID of a scheduled job. To specify the name, the ID of a job, or the runid, the @name argument is prefixed with jname or runid.�

option

Specifies a comma-separated list of options, the option_name=option_value pairs that define the action to perform, and filters to restrict the information returned.

Returns

Returns 0 on success or an error code.

Examples

Example 1

The following example produces a list of all the scheduled jobs that are running:

sp_sjobhelp  @option=‘list,all_users,running’�

Example 2

The following example produces a report showing all the jobs scheduled by the caller:

sp_sjobhelp @option=’report,scheduled’

Example 3

The following example �produces a list of all the jobs and schedules that are not used in any scheduled jobs:

sp_sjobhelp  @option=‘list,all_users,unscheduled’

Usage

The report will be in several sections, showing the scheduled jobs, jobs that do not have schedules, and the schedules.





Copyright © 2005. Sybase Inc. All rights reserved. sp_sjobcontrol

View this book as PDF