SQL Server Agent stored procedures
77 reference entries
- sp_add_alert
spaddalert (Transact-SQL).
- sp_add_category
Adds the specified category of jobs, alerts, or operators to the server.
- sp_add_job
spaddjob creates a new job to be executed by the SQL Server Agent service.
- sp_add_jobschedule
spaddjobschedule creates a schedule for a SQL Server Agent job.
- sp_add_jobserver
Targets the specified job at the specified server.
- sp_add_jobstep
spaddjobstep adds a step (operation) to a SQL Server Agent job.
- sp_add_notification
Sets up a notification for an alert.
- sp_add_operator
Creates an operator (notification recipient) for use with alerts and jobs.
- sp_add_proxy
Adds the specified SQL Server Agent proxy.
- sp_add_schedule
Creates a schedule that can be used by any number of jobs.
- sp_add_targetservergroup
Adds the specified server group.
- sp_add_targetsvrgrp_member
Adds the specified target server to the specified target server group.
- sp_apply_job_to_targets
Applies a job to one or more target servers or to the target servers belonging to one or more target server groups.
- sp_attach_schedule
spattachschedule sets a schedule for a job.
- sp_cycle_agent_errorlog
Closes the current SQL Server Agent error log file, and cycles the SQL Server Agent error log extension numbers.
- sp_delete_alert
spdeletealert removes an alert.
- sp_delete_category
Removes the specified category of jobs, alerts, or operators from the current server.
- sp_delete_job
spdeletejob (Transact-SQL) deletes an existing job from the SQL Server Agent service.
- sp_delete_jobschedule
spdeletejobschedule deletes a schedule for a job in the SQL Server Agent service.
- sp_delete_jobserver
spdeletejobserver removes the specified target server.
- sp_delete_jobstep
Removes a job step from a job in the SQL Server Agent service.
- sp_delete_jobsteplog
Removes all SQL Server Agent job step logs that are specified with the arguments.
- sp_delete_notification
Removes a SQL Server Agent notification definition for a specific alert and operator.
- sp_delete_operator
spdeleteoperator removes an operator.
- sp_delete_proxy
spdeleteproxy removes the specified proxy.
- sp_delete_schedule
spdeleteschedule deletes a schedule.
- sp_delete_targetserver
Removes the specified server from the list of available target servers.
- sp_delete_targetservergroup
Deletes the specified target server group.
- sp_delete_targetsvrgrp_member
Removes a target server from a target server group.
- sp_detach_schedule
spdetachschedule removes an association between a schedule and a job.
- sp_enum_login_for_proxy
spenumloginforproxy lists associations between security principals and proxies.
- sp_enum_proxy_for_subsystem
spenumproxyforsubsystem lists permissions for SQL Server Agent proxies to access subsystems.
- sp_enum_sqlagent_subsystems
Lists the SQL Server Agent subsystems.
- sp_grant_login_to_proxy
spgrantlogintoproxy grants a security principal access to a proxy.
- sp_grant_proxy_to_subsystem
spgrantproxytosubsystem grants a proxy access to a subsystem.
- sp_help_alert
Reports information about the alerts defined for the server.
- sp_help_category
Provides information about the specified classes of jobs, alerts, or operators.
- sp_help_downloadlist
Lists all rows in the sysdownloadlist system table for the supplied job, or all rows if no job is specified.
- sp_help_job
Returns information about jobs that are used by SQL Server Agent to perform automated activities in SQL Server.
- sp_help_jobactivity
Lists information about the runtime state of SQL Server Agent jobs.
- sp_help_jobcount
sphelpjobcount provides the number of jobs that a schedule is attached to.
- sp_help_jobhistory
Provides information about the jobs for servers in the multiserver administration domain.
- sp_help_jobs_in_schedule
Returns information about the jobs that a particular schedule is attached to.
- sp_help_jobschedule
Returns information about the scheduling of jobs used by SQL Server Management Studio to perform automated activities.
- sp_help_jobserver
sphelpjobserver returns information about the server for a given job.
- sp_help_jobstep
Returns information for the steps in a job used by SQL Server Agent service to perform automated activities.
- sp_help_jobsteplog
Returns metadata about a specific SQL Server Agent job step log.
- sp_help_notification
Reports a list of alerts for a given operator or a list of operators for a given alert.
- sp_help_operator
Reports information about the operators defined for the server.
- sp_help_proxy
sphelpproxy lists information for one or more proxies.
- sp_help_schedule
sphelpschedule lists information about schedules.
- sp_help_targetserver
sphelptargetserver lists all target servers.
- sp_help_targetservergroup
sphelptargetservergroup lists all target servers in the specified group.
- sp_manage_jobs_by_login
spmanagejobsbylogin deletes or reassigns jobs that belong to the specified login.
- sp_msx_defect
spmsxdefect removes the current server from multiserver operations.
- sp_msx_enlist
spmsxenlist adds the current server to the list of available servers on the master server.
- sp_msx_get_account
spmsxgetaccount lists information on the credential that the target server uses to log in to the master server.
- sp_msx_set_account
spmsxsetaccount sets the SQL Server Agent master server account name and password on the target server.
- sp_notify_operator
spnotifyoperator sends an e-mail message to an operator using Database Mail.
- sp_post_msx_operation
Inserts rows into the sysdownloadlist system table for target servers to download and execute.
- sp_purge_jobhistory
sppurgejobhistory removes the history records for a job in the SQL Server Agent service.
- sp_remove_job_from_targets
spremovejobfromtargets removes the specified job from the given target servers or target server groups.
- sp_resync_targetserver
spresynctargetserver resynchronizes all multiserver jobs in the specified target server.
- sp_revoke_login_from_proxy
sprevokeloginfromproxy removes access to a proxy for a security principal.
- sp_revoke_proxy_from_subsystem
sprevokeproxyfromsubsystem revokes access to a subsystem from a proxy.
- sp_start_job
spstartjob instructs the SQL Server Agent to execute a job immediately.
- sp_stop_job
spstopjob instructs SQL Server Agent to stop the execution of a job.
- sp_update_alert
Updates the settings of an existing alert.
- sp_update_category
Changes the name of a category.
- sp_update_job
spupdatejob (Transact-SQL) update the attributes of an existing job created in the SQL Server Agent service.
- sp_update_jobschedule
spupdatejobschedule changes the schedule settings for the specified job in the SQL Server Agent service.
- sp_update_jobstep
spupdatejobstep changes the settings for a step in a job in the SQL Server Agent service.
- sp_update_notification
Updates the notification method of an alert notification.
- sp_update_operator
Updates information about an operator (notification recipient) for use with alerts and jobs.
- sp_update_proxy
Changes the properties of an existing proxy.
- sp_update_schedule
Changes the settings for a SQL Server Agent schedule.
- sp_update_targetservergroup
Changes the name of the specified target server group.