OS User Cant create Jobs inside SQL Server

  • Hello,

    I've got one Windows Authentication login created inside my SQL Server Instance, i really dont know what kind of privileges should i give to him to create jobs on this instance.

    The point is that i give him grant execute on all stored procedures that exists in MSDB, before i've give him the privileges that are down in this topic (see Privileges that i give to user), and also put him with dbo of the msdb. :crazy:

    I send you too, one document attached to this post with a SQL Server Login that i created with exactly the same privileges that i give to this [Domain\username], but in this case the SQL Server Login can create jobs and change them.

    I really don't understand what is happening, so i'm feeling :sick:

    Hope you can help me.

    Thanks and regards,

    JMSM 😉

    Privileges that user owns

    GRANT EXECUTE ON master.dbo.xp_sqlagent_notify TO [Domain\username]

    GO

    GRANT EXECUTE ON master.dbo.xp_sqlagent_enum_jobs TO [Domain\username]

    GO

    GRANT EXECUTE ON master.dbo.xp_sqlagent_param TO [Domain\username]

    GO

    GRANT EXECUTE ON master.dbo.xp_sqlagent_is_starting TO [Domain\username]

    GO

    GRANT EXECUTE ON master.dbo.xp_instance_regenumvalues TO [Domain\username]

    GO

    use msdb

    go

    GRANT EXECUTE ON msdb.dbo.sp_help_alert TO [Domain\username]

    GO

    GRANT EXECUTE ON msdb.dbo.sp_help_notification TO [Domain\username]

    GO

    grant select on msdb.dbo.sysalerts to [Domain\username]

    go

    grant select on msdb.dbo.sysoperators to [Domain\username]

    go

    grant select on msdb.dbo.sysnotifications to [Domain\username]

    go

    use master

    go

    grant select on master.dbo.sysperfinfo to [Domain\username]

    go

  • A better way to handle this is to assign the user to the correct Role(s) in the msdb database. Here is the link to the BOL description of the roles:

    http://msdn.microsoft.com/en-us/library/ms188283.aspx

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply