SQL Agent Uses Default User profile

  • Hi,
     
    I am having an issue whereby I have a SQL Server Agent job that has a step that needs to execute as a particular user (for which I have set up credentials and a proxy in SQL Server). This user has details in their profile that need to be accessed by the job.
     
    The job executes fine, but does not find the details in the user profile. I created a small bat script to debug and can see that the user is logged in OK (using whoami), but the %USERPROFILE% variable is set to "Default User". This does not happen when the required user is logged in to the machine at the time of execution.
     
    Is there some configuration or security setting I am missing?
     
    any help is much appreciated.
     
    scott.
  • i think u need to execute a job with someother user. otherr than the owner of the job. try to use the "execute as user" in the execute step and try if it fixes ur problem.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Hi

    You need to change MSSQLSERVER Agent service logon in windows control panel. Instead of default user, mention domain or workgroup user and password and then re-start agent service.

    Amit

  • Hi,

    Thanks for replies...

    The agent service doesnt run as Default User, but as a domain account (myDomain\SqlSvc). If I set the Job step to 'run as' SQL Server agent service, the correct profile is loaded (ie for SQLSvc). I believe this is because the Agent is in fact already running as this user.

    scott

Viewing 4 posts - 1 through 3 (of 3 total)

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