SSRS - Unable to determine if the owner of job has server access [SQLSTATE 42000] (Error 15404))
Asked Answered
U

4

7

SQL Server Reporting Services, in SSRS it seems like Schedules never fire, however a look at the SQL Agent reveals a permission issue related to not being able to resolve a user account.

Seems SQL Agent does not rely on caching or whatever voodoo Windows magically works.

link text Fix is listed here... edit --

Above is the fix I used to workaround this issue, has any one found any other work arounds or resolutions to this issue?

It seems that by default the SSRS Generated Schedules are run as this phantom user account. How do I change this default? Is SSRS creating the jobs as the user the service runs as?

Thanks Remus

Uralian answered 15/12, 2009 at 4:28 Comment(1)
Personally I wouldn't recommend the link you provided as it is just circumventing what you can do with the Report Services Configuration Manager. I think it's best to just change the Report Server Service Account using the RS Config Manager. That was the database integrity is maintainedBalmy
S
8

I was running into the same issue. Here is how I fixed it.

Problem description When setting an SSRS report subscription to run at a given time, I would wait for the time to pass and then find that the "Last Run" timestamp did not change. My subscription appears not to have run.

Relevant troubleshooting info

  1. SSRS report subscriptions are executed as SQL Jobs that the Report Server web UI creates for you behind the scenes.

  2. When looking at the job that was created for my report subscription, I saw that it always failed with the error:

    The job failed. Unable to determine if the owner (domain\userName) of job 0814588B-D590-4C45-A304-6086D5C1F559 has server access (reason: Could not obtain information about Windows NT group/user 'domain\userName', error code 0x5. [SQLSTATE 42000] (Error 15404)).

  3. In the Sql Server Configuration Manager I could see that the "SQL Server Reporting Services" service was configured to run using an AD user account.

  4. In the Sql Server Configuration Manager I could see that the "SQL Server" service was configured to run using a local Windows account.

  5. As @Remus Resanu pointed out, the SQL error 15404 refers to an exception when EXECUTE AS context cannot be impersonated.

Solution Bingo! #4 and #5 are the key to the problem. The SQL Server service (a local Windows user account) was trying to authenticate the user "domain\userName" in AD, which it could not do because it does not have the right/permission to access AD resources.

I changed the SQL Server service to us an AD user account, restarted the SQL Server and SQL Server Agent services, re-ran the SQL job and, blamo, success!

Salad answered 30/7, 2013 at 19:4 Comment(0)
B
3

I did 2 things and it's now working.

1) Go to "SQL Server Configuration", change the "SQL Server Agent" - "Log On As" to match the "SQL Server" above.

enter image description here

2) Secondly, open "Microsoft SQL Management Studio", at the "SQL Server Agent", expand the "Jobs" and you should be able to see your created job. Right click on it and go to "Properties". enter image description here

3) Change the owner to also match the "SQL Server Agent" above. enter image description here

After, I'm able to execute the Maintenance Plan without any issue.

Blockhead answered 4/12, 2018 at 4:38 Comment(0)
O
1

15404 is the exception when EXECUTE AS context cannot be impersonated. Reasons for these error are plenty. The most common reasons are:

  • when the SQL Server instance does not have access to the AD server because is running as a local user or as 'local service' (this would have an error code 0x5, ACCESS_DENIED)
  • when the SQL Server is asked to impersonate an unknown user, like an user from a domain the SQL Server has not idea about (this would have the error code 0x54b, ERROR_NO_SUCH_DOMAIN)

The proper solution is always dependent on the error code, which is the OS error when trying to obtain the impersonated user identity token: one searches first for the error code in the System Error Codes table (or fires up windbg, does a loopback non-invasive kernel debug connection and goes !error, which is what I prefer cause is faster...).

So, John... do you actually have a question, or just posted a random piece of partial information?

Olsewski answered 15/12, 2009 at 5:13 Comment(0)
M
1

Just follow this steps in images

Just follow this steps in images

Mccartney answered 8/3, 2019 at 7:32 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.