Could not obtain information about Windows NT group user
Asked Answered
E

9

45

I am creating a SQL Server Replication using a script. When I try to execute

The job failed. Unable to determine if the owner (STAR\moorer7) of job L3BPT2M-Atlas-14 has server access (reason: Could not obtain information about Windows NT group/user 'STAR\moorer7', error code 0x5. [SQLSTATE 42000] (Error 15404)).

This is a job created by a script that defines replication.

How do I debug this?

Eschar answered 5/8, 2009 at 17:13 Comment(3)
I changed the owner in job properties to 'sa' then the issue solved.Selfknowledge
Heh. You asked this 7 years ago and it's still helping people like me today.Slating
Can anybody tell me why when the job or maintenance plan owner is in AD and an Admin on the SQL box does this error still happen? I always have to revert back to the sa account to get anything to run.Plant
R
36

Active Directory is refusing access to your SQL Agent. The Agent should be running under an account that is recognized by STAR domain controller.

Reynaldoreynard answered 5/8, 2009 at 17:30 Comment(7)
@Remus Rusanu:The agent is running under a local machine account as MyWorkstation\SqlServerAccountEschar
@Raj: Actually since is the SQL Server itself that is connecting to the AD, you need to change the account under which SQL is running. It has to be an account AD will authenticate, like a domain account or the NETWORK SERVICE account(provided the machine is joined to the domain). SSMS or EM can have an option to change the service account.Reynaldoreynard
+1 for keeping me from having to talk to my dba (several hours saved)Hepatic
Brent Ozar recommends (with caution of course) that SQL Server Agent Jobs be owned by SA, because the owner doesn't really matter to how the job functions, until it fails due to the owner being dropped or non-authenticated. See here: brentozar.com/blitz/jobs-owned-by-user-accounts . A service account is the next best thing, as long as you have it configured right and it's never at risk of being locked-out or disabled.Stob
I have had this SQL Agent error as the result of ephemeral port exhaustion that prevented SQL Server connections from occurring. The SQL Agent error was accompanied by intermittent NETLOGON and Group Policy errors seen in the database server's System Event log.Krieger
What is a STAR domain controller?Eldon
@jl's comment got me to check the System event log, where I found NETLOGON and DNS update errors. Made me wonder if the SQL server's NIC was still pointing to the domain controller for DNS and it was not. Not sure how that changed, but updating the SQL server to get DNS from the domain controller should allow it to validate domain users again. See also Rail's answer https://mcmap.net/q/368516/-could-not-obtain-information-about-windows-nt-group-user.Cupola
B
10

For me, the jobs were running under DOMAIN\Administrator and failing with the error message "The job failed. Unable to determine if the owner (DOMAIN\administrator) of job Agent history clean up: distribution has server access (reason: Could not obtain information about Windows NT group/user 'DOMAIN\administrator', error code 0x5. [SQLSTATE 42000] (Error 15404)). To fix this, I changed the owner of each failing job to sa. Worked flawlessly after that. The jobs were related to replication cleanup, but I'm unsure if they were manually added or were added as a part of the replication set-up - I wasn't involved with it, so I am not sure.

Bunting answered 19/9, 2016 at 15:0 Comment(0)
R
9

We encountered similar errors in a testing environment on a virtual machine. If the machine name changes due to VM cloning from a template, you can get this error.

If the computer name changed from OLD to NEW.

A job uses this stored procedure:

msdb.dbo.sp_sqlagent_has_server_access @login_name = 'OLD\Administrator'

Which uses this one:

EXECUTE master.dbo.xp_logininfo 'OLD\Administrator'

Which gives this SQL error 15404

select text from sys.messages where message_id = 15404;
Could not obtain information about Windows NT group/user '%ls', error code %#lx.

Which I guess is correct, under the circumstances. We added a script to the VM cloning/deployment process that re-creates the SQL login.

Riffle answered 16/2, 2012 at 21:43 Comment(0)
D
3

In my case I was getting this error trying to use the IS_ROLEMEMBER() function on SQL Server 2008 R2. This function isn't valid prior to SQL Server 2012.

Instead of this function I ended up using

select 1 
from sys.database_principals u 
inner join sys.database_role_members ur 
    on u.principal_id = ur.member_principal_id 
inner join sys.database_principals r 
    on ur.role_principal_id = r.principal_id 
where r.name = @role_name 
and u.name = @username

Significantly more verbose, but it gets the job done.

Deville answered 3/1, 2013 at 18:44 Comment(0)
L
3

Just solved this problem. In my case it was domain controller is not accessible, because both dns servers was google dns.

I just add to checklist for this problem:

  • check domain controller is accessible
Loculus answered 4/8, 2014 at 11:26 Comment(1)
Me too. Had to change DNS to point to the domain controller so it can validate domain users.Cupola
G
1

I was having the same issue, which turned out to be caused by the Domain login that runs the SQL service being locked out in AD. The lockout was caused by an unrelated usage of the service account for another purpose with the wrong password.

The errors received from SQL Agent logs did not mention the service account's name, just the name of the user (job owner) that couldn't be authenticated (since it uses the service account to check with AD).

Gisarme answered 4/3, 2015 at 0:51 Comment(0)
S
1

I had to connect to VPN for the publish script to successfully deploy to the DB.

Semantic answered 25/4, 2015 at 17:42 Comment(0)
I
1

In our case, the Windows service account that SQL Server and SQL Agent were running under were locked out in Active Directory.

Icicle answered 12/7, 2019 at 12:57 Comment(0)
B
0

I just got this error and it turns out my AD administrator deleted the service account used by EVERY SQL Server instance in the entire company. Thank goodness AD has its own recycle bin.

See if you can run the Active Directory Users and Computers utility (%SystemRoot%\system32\dsa.msc), and check to make sure the account you are relying on still exists.

Billion answered 26/5, 2020 at 22:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.