SQL Server Performance

execute job in sql

Discussion in 'SQL Server 2008 General Developer Questions' started by arkiboys, Jan 19, 2010.

  1. arkiboys Member

    I am running this query from my database.
    @PackageName varchar(100)

    set @Packagename = 'JobName'
    EXEC msdb..sp_start_job @job_name = @PackageName

    In the query analyser of my database, I log in as a user with password.
    This user has User mapping to my database and msdb with db_ddlAdmin
    When I try to execute this query, the error I get is:
    The specified @job_name ('JobName') does not exist.
    BUT, if I log in as windows login, then this query runs successfully.
    Do you know why please?
  2. moh_hassan20 New Member

    let the account member of the following roles in user mapping of MSDB database:

  3. arkiboys Member

    Thank you
  4. moh_hassan20 New Member

    [quote user="arkiboys"]Solved.[/quote]
    Can you share your knowledge .
  5. preethi Member

    [quote user="arkiboys"]Solved.
    Thank you[/quote]
    Good to know it is solved. But when you share how you have solved it, it will be helpful for other readers to solve the same problem.
  6. satya Moderator

    Who is the owner for this job?

Share This Page