123

I have a Windows 2012 Server running SharePoint 2010 using an SQL Server Express locally installed. Unfortunately my logs are currently flooding with message "An exception occurred while enqueueing a message in the target queue. Error: 15404, State: 19. Could not obtain information about Windows NT group/user 'DOMAIN\user', error code 0x5." It can be 20 such messages every second!

(...and the 'DOMAIN\user' happens to be my personal account.)

Are there a job running that has missing rights? "Qoute from https://serverfault.com/questions/277551/mssqlserver-exception-occurred-while-enqueueing-a-message-in-the-target-queue-e "Try to changing the owner of the jobs to the sa account, on the properties of the job." If I'm correct the express version of SQL server cannot run jobs? Or is there someone/something that wants access to our AD? Why do that account wants to obtain information about my account 20 times every second?

I do find lot's of blogs and hints about this task, but I just dont understand the solutions. One says "To repair this, login as one of the SA accounts and grant SA access for the account that needs it." But what account needs sa access?

1
  • For me the error code is 0x54b and the solutions below worked - unfortunately it took me some time to find this thread so hopefully this comment will help
    – Phil
    Mar 29 at 12:36

11 Answers 11

274

Change the owner to sa. Here are the steps I took to solve this issue:

  1. Right-Click on the database and select properties

  2. Click on Files under the Select a page

  3. Under the Owner, but just below the Database Name on the right-hand pane, select sa as the owner.

6
  • 21
    This worked for me but I don't understand why though May 29, 2018 at 10:12
  • 1
    Thanks, it solved my problem because my laptop is used in domain and therefore mine account was limited. Adding sa as owner solved it.
    – Michal
    Oct 31, 2018 at 12:24
  • So much easier than fiddling with script. I hate SMS's cryptic errors. May 10, 2019 at 15:42
  • Can you help in case we have SQL Server Azure Database? May 17, 2020 at 10:15
  • 1
    This worked for me, when getting this error while attempting to enqueue messages to a Service Broker queue on a LocalDB database while off VPN on my domain-connected computer
    – IGx89
    Oct 22, 2021 at 15:04
169

In my case, sa was not the owner of the DB, I was. When I tried to execute CLR configuration that required sa privileges, I got the error too.

The solution:

USE MyDB 
GO 
ALTER DATABASE MyDB set TRUSTWORTHY ON; 
GO 
EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false 
GO 
sp_configure 'show advanced options', 1; 
GO 
RECONFIGURE; 
GO 
sp_configure 'clr enabled', 1; 
GO 
RECONFIGURE; 
GO

I used help from the db team at work and this post to find the answer.

7
  • 1
    Not OP, but I had the same issue and this solution worked for me Aug 17, 2016 at 17:58
  • 1
    Thank you! Saved my evening!
    – Colin
    Dec 23, 2016 at 3:51
  • 1
    That is helped me. Thanks. Apr 5, 2017 at 16:25
  • 2
    This just got me out of a hole. My service broker wasn't working, and the transmission queue was showing an error. Oct 3, 2018 at 13:07
  • 1
    thank you so much - this has been an ABSOLUTE lifesaver (with one evening left before my demo!) Jan 23, 2020 at 15:15
27

In my case the owner of the database was a domain account Domain\Me.

The error message was

Error: 15404, State: 19. Could not obtain information about Windows NT group/user 'Domain\MyAccount'

The problem was that the database didn't know what to do with the domain account - so the logical thing to do was to use a local account instead.

I tried changing the owner of the database, but things still wouldn't work correctly.

In the end I dropped and recreated the entire database MAKING SURE THAT THE OWNER WAS SA

enter image description here

I also set the Broker to Enabled in the settings

enter image description here

Thing started magically working after this

2
  • 3
    For my localdb instance, I was able to just change the owner in the "Files" page of the db properties (no recreation necessary) and this solved the problem. Dec 11, 2017 at 12:16
  • 2
    My issue is related to creating a diagram in my 2017 instance / database. It's owner is already set to sa yet I'm receiving this error. The only difference between yours and mine is that you enabled the Broker. I don't understand what that does, though, or why it's needed. I have a 2014 instance / database where the owner is a domain account and the Broker is disabled and it creates diagrams just fine. Totally confused. Oct 17, 2018 at 17:12
9

No Domain Authentication

Failure was ultimately due to the fact that it was not able to authenticate when I was not vpn-ed into the corporate network.

For I was connecting to a local db on my work laptop, however the User 'DOMAIN\user' needed to be authenticated by AD on the corporate network.

Error was resolved as soon as I reconnected and refreshed; the error disappeared.

1
  • Changing the owner to 'sa' as described in other answers will work, but for me, re-connecting back to the VPN gets thing working without needing to change anything in the database or its configuration.
    – Steve
    Oct 10, 2022 at 18:57
5

to do a bulk update for all databases, run this script and then execute its output:

 SELECT 'ALTER AUTHORIZATION ON DATABASE::' + QUOTENAME(name) + ' TO [sa];' 
 from sys.databases
     where name not in ('master', 'model', 'tempdb')
4

I had this error from a scheduled job in sql Server Agent, in my case, just after I changed the hostname of the Windows Server. I had also ran sp_dropserver and sp_addserver. My database was owned by "sa", not a Windows user.

I could login into SQL as the Windows user NEWHOSTNAME\username (I guess after a hostname change, the SID doesn't change, that's why it worked automatically?).

However, in SQL, in Security/Logins node, I had SQL logins defined as OLDHOSTNAME\username. I connected to SQL using "sa" instead of Windows Integrated, dropped the old logins, and create new ones with NEWHOSTNAME\username.

The error disappeared.

3

I was having the same problem. In my case it was due to the fact that my machine was part of a domain, but I was not connected to the company VPN. The problem was solved after connecting to the VPN (so the domain user could be resolved by the SQLAgent).

1

I had the same issue where my domain login was not being recognized. All I did was go into the SQL Server configuration manager and start the services as Network Services instead of a local service. The sql server / agent was then able to recognize the AD logins for the jobs.

1

In my case, it was VPN issue. When I turned on the VPN to connect with my office network & then tried to start the snapshot agent again, it started successfully.

2
  • I face the same issue. I am using Cisco VPN, and if I am connected to it the problem goes away. If I am connected directly to my office network (not vpn), the error occurs returns. Is there a setting that you found on network adapter or sql to help with this?
    – CesarB
    Nov 19, 2019 at 7:11
  • Two things, First, try to connect with VPN even when you are in office. It should work. Now disconnect VPN and restart Agent service then try. If it still doesn't work then connect with IT team in your office. Nov 19, 2019 at 7:24
1

I was facing the same issue. Fix for me was changing the log-on from NT User to global user in Sql Server Configuration Manager => Sql Server Service => Sql Server Agent => Properties => Account name.

enter image description here

0

You should be connected with your domain. (VPN)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.