Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize


SQL Server 2000

Deletes or reassigns jobs that belongs to the specified login.


sp_manage_jobs_by_login [@action =] 'action'
    [, [@current_owner_login_name =] 'current_owner_login_name']
    [, [@new_owner_login_name =] 'new_owner_login_name']


[@action =] 'action'

Is the action to take for the specified login. action is varchar(10), with no default. When action is DELETE, sp_manage_jobs_by_login deletes all jobs owned by current_owner_login_name. When action is REASSIGN, all jobs are assigned to new_owner_login_name.

[@current_owner_login_name =] 'current_owner_login_name'

Is the login name of the current job owner. current_owner_login_name is sysname, with no default.

[@new_owner_login_name =] 'new_owner_login_name'

Is the login name of the new job owner. Use this parameter only if action is REASSIGN. new_owner_login_name is sysname, with a default of NULL.

Return Code Values

0 (success) or 1 (failure)

Result Sets



Only members of the sysadmin fixed server role can execute sp_manage_jobs_by_login.


This example reassigns all jobs from janetl to stevenb.

USE msdb
EXEC sp_manage_jobs_by_login 'REASSIGN', 'janetl', 'stevenb'

See Also


System Stored Procedures

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft