15404 sql ошибка когда создаю диаграмму

I tried to create a database diagramm with SQL Server 2008, but an error occurs:

Database diagram support objects
cannot be installed because this
database does not have a valid owner.
To continue, first use the Files page
of the Database Properties dialog box
or the ALTER AUTHORIZATION statement
to set the database owner to a valid
login, then add the database diagram
support objects.

Then I tried the following:

EXEC sp_dbcmptlevel 'Ariha', '90';
GO
ALTER AUTHORIZATION ON DATABASE::Ariha TO [WIN-NDKPHUPPNFLAdministrator]
GO
USE Ariha
GO
EXECUTE AS USER = N'dbo' REVERT
GO

Next erorr pops up:

Msg 15404, Level 16, State 11, Line 1
Could not obtain information about
Windows NT group/user
‘WIN-NDKPHUPPNFLAdministrator’, error
code 0x534.

The Problem is the name of the PC has changed into «DevPC» I also changed this in the update script, but still the same error 15404.

What can I do to fix this annoying error?

Tim Abell's user avatar

Tim Abell

11.1k8 gold badges79 silver badges109 bronze badges

asked Jan 11, 2010 at 17:00

Rookian's user avatar

2

In SQL Server Management Studio do the following:

  1. Right Click on your database, choose properties
  2. Go to the Options Page
  3. In the Drop down at right labeled «Compatibility Level» choose «SQL Server 2005(90)»
    3-1. choose «SQL Server 2008» if you receive a comparability error.
  4. Go to the Files Page
  5. Enter «sa» in the owner textbox.
    5-1 or click on the ellipses(…) and choose a rightful owner.
  6. Hit OK

after doing this, You will now be able to access the Database Diagrams.

enter image description here

Lesly Revenge's user avatar

answered Apr 20, 2012 at 14:26

Israel Margulies's user avatar

Israel MarguliesIsrael Margulies

8,6262 gold badges30 silver badges26 bronze badges

8

You should consider SQL authentication account for database ownership; then you don’t have to worry about accounts coming and going, databases or instances moving to different servers, and your next PC name change. I have several systems where we use:

ALTER AUTHORIZATION ON DATABASE::Ariha TO [sa];

Or if you want to change the owner to that local Administrator account, then it should be:

ALTER AUTHORIZATION ON DATABASE::Ariha TO [DevPCAdministrator];

Because renaming the machine to DevPC has eliminated the local account that used to be named WIN-ND...Administrator and this has also invalidated the current owner of the database.

If SELECT @@SERVERNAME; is not accurate (it should say DevPC), then in order to ensure that your server rename has taken hold within SQL Server, you may also want to issue the following:

EXEC sys.sp_dropserver @server = N'old server name';
GO
EXEC sys.sp_addserver @server = N'DevPC', @local = N'local';
GO

answered Jan 11, 2010 at 17:50

Aaron Bertrand's user avatar

Aaron BertrandAaron Bertrand

272k36 gold badges465 silver badges487 bronze badges

5

USE [ECMIS]
GO
EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false
GO

It works.

piet.t's user avatar

piet.t

11.7k21 gold badges42 silver badges52 bronze badges

answered Jan 31, 2017 at 6:53

RafiO's user avatar

RafiORafiO

1131 gold badge3 silver badges9 bronze badges

0

Enter «SA» instead of «sa» in the owner textbox. This worked for me.

answered Oct 23, 2013 at 13:19

Adarsh V C's user avatar

Adarsh V CAdarsh V C

2,3221 gold badge20 silver badges37 bronze badges

0

I had the same problem.
I wanted to view my diagram, which I created the same day at work, at home. But I couldn’t because of this message.
I found out that the owner of the database was the user of my computer -as expected. but since the computer is in the company’s domain, and I am not connected to the company’s network, the database couldn’t resolve the owner.

So what I did is change the owner to a local user and it worked!!
Hope this helps someone.

You change the user by right-click on the database, properties, files, owner

answered Jul 4, 2016 at 22:46

PhpLou's user avatar

PhpLouPhpLou

4303 silver badges16 bronze badges

Select your database — Right Click — Select Properties

Select FILE in left side of page

In the OWNER box, select button which has three dots (…) in it

Now select user ‘sa and Click OK

answered Jul 9, 2018 at 18:21

Anil Singh's user avatar

Anil SinghAnil Singh

3343 silver badges6 bronze badges

0

This fixed it for me. It sets the owner found under the ‘files’ section of the database properties window, and is as scripted by management studio.

USE [your_db_name]
GO
EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false
GO

According to the sp_changedbowner documentation this is deprecated now.

Based on Israel’s answer. Aaron’s answer is the non-deprecated variation of this.

answered Oct 16, 2014 at 10:33

Tim Abell's user avatar

Tim AbellTim Abell

11.1k8 gold badges79 silver badges109 bronze badges

I just experienced this. I had read the suggestions on this page, as well as the SQL Authority suggestions (which is the same thing) and none of the above worked.

In the end, I removed the account and recreated (with the same username/password). Just like that, all the issues went away.

Sadly, this means I don’t know what went wrong so I can’t share any thing else.

answered Mar 7, 2015 at 16:12

Dave's user avatar

DaveDave

8,12311 gold badges67 silver badges103 bronze badges

1.Right click on your Database ,
2.Then select properties .
3.Select the option in compatibility levels choose sql 2008[100] if you are working with Microsoft sql 2008.

4.Then select the file and write ( sa ) in owner`s textbox

100% works for me.

answered May 5, 2015 at 14:56

Jefferson X Masonic's user avatar

An easier way to solve this issues would be to right click the name of your database, choose «New Query», type » exec sp_changedbowner ‘sa’ » and execute the query. Then you’ll be good to go.

answered Jun 2, 2015 at 7:38

Lebone Mcdonald's user avatar

you must enter as administrator right click to microsofft sql server management studio and run as admin

answered Jan 23, 2017 at 18:25

abdelnaser rafat's user avatar

Only need to execute it in query editor
ALTER AUTHORIZATION ON DATABASE::YourDatabase TO [domainaccount];

answered May 30, 2019 at 15:27

Nui San's user avatar

0

The real problem is that the default owner(dbo) doesn’t have a login mapped to it at all.As I tried to map the sa login to the database owner I received another error stating «User,group, or role ‘dbo’ already exists…».However if you try this code it will actually works :

EXEC sp_dbcmptlevel ‘yourDB’, ’90’;

go

ALTER AUTHORIZATION ON DATABASE::yourDB TO «yourLogin»

go

use [yourDB]

go

EXECUTE AS USER = N’dbo’ REVERT

go

answered Apr 17, 2013 at 9:18

Vandana's user avatar

right click on your Database , then select properties .
select the option in compatibility levels choose sql 2005[90] instead of 2008 if you are working with Microsoft sql 2008.
then select the file and write ( sa ) in owner`s textbox.
it will work probably

answered Apr 26, 2015 at 8:38

Ezzo gasmallah's user avatar

  • Remove From My Forums
  • Question

  • Running SQL Server 2016 Developer version at home on Windows 10 Pro x64. I’ve added AdventureWorksDW2014, altered the DB Owner to my login name and tried to add a database diagram.

    I get the error «Could not obtain informaton about Windows NT group/user ‘my machinemy name’, error code 0x534. (Microsoft SQL Server, Error:15404)»

    References I’ve found on-line seem to refer to this problem in relation to SQL Server Agent and the account that is running under. When I installed SQL Server, I just accepted the defaults with regards accounts the various services run
    under.

    Under security, I have my login listed as sysadmin so I think I should have permissions to create the DB diagram.


    Nick Ryan MIS Programmer Analyst, ANZ Bank

Answers

    • Edited by

      Tuesday, February 7, 2017 5:43 AM

    • Proposed as answer by
      Sunil Gure
      Tuesday, February 7, 2017 7:41 AM
    • Marked as answer by
      Nick Ryan
      Wednesday, February 8, 2017 8:22 PM
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords

MSSQLSERVER_15404

MSSQLSERVER_15404

MashaMSFT

mathoma

04/04/2017

sql

supportability

reference

15404 (Database Engine error)

MSSQLSERVER_15404

[!INCLUDE SQL Server]

Details

Attribute Value
Product Name SQL Server
Event ID 15404
Event Source MSSQLSERVER
Component SQLEngine
Symbolic Name SEC_NTGRP_ERROR
Message Text Could not obtain information about Windows NT group/user ‘user‘, error code code.

Explanation

15404 is used in authentication when an invalid principal is specified. Or, impersonation of a Windows account fails because there is no full trust relationship between the [!INCLUDEssNoVersion] service account and the domain of the Windows account.

User Action

Check that the Windows principal exists and is not misspelled.

If this error is the result of a lack of a full trust relationship between the [!INCLUDEssNoVersion] service account and the domain of the Windows account, one of the following actions can resolve the error:

  • Use an account from the same domain as the Windows user for the [!INCLUDEssNoVersion] service.

  • If [!INCLUDEssNoVersion] is using a machine account such as Network Service or Local System, the machine must be trusted by the domain containing the Windows User.

  • Use a [!INCLUDEssNoVersion] account.

Running SQL Server 2016 Developer version at home on Windows 10 Pro x64. I’ve added AdventureWorksDW2014, altered the DB Owner to my login name and tried to add a database diagram.

I get the error «Could not obtain informaton about Windows NT group/user ‘my machinemy name’, error code 0x534. (Microsoft SQL Server, Error:15404)»

References I’ve found on-line seem to refer to this problem in relation to SQL Server Agent and the account that is running under. When I installed SQL Server, I just accepted the defaults with regards accounts the various services run
under.

Under security, I have my login listed as sysadmin so I think I should have permissions to create the DB diagram.


Nick Ryan MIS Programmer Analyst, ANZ Bank

SQL Server Error: 15404
Severity: 16
Event Logged or not: No
Description:
Could not obtain information about Windows NT group/user ‘%ls’, error code %#lx.
Severity 16 Description:
Indicates general errors that can be corrected by the user.

Error Description:

The job failed. Unable to determine if the owner (DomainVBR) of job L14-Server has server access (reason: Could not obtain information about Windows NT group/user ‘DomainVBR’, error code 0x5. [SQLSTATE 42000] (Error 15404)).

“The job failed. Unable to determine if the owner (DOMAINadministrator) of job Agent history clean up: distribution has server access (reason: Could not obtain information about Windows NT group/user ‘DOMAINadministrator’, error code 0x5. [SQLSTATE 42000] (Error 15404)).”

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

For other ways to read and find error log location please our artcile https://sqlserver-dba.co.uk/error-log/sql-server-identify-location-of-the-sql-server-error-log-file.html

Solution for Resolving the Error

When an invalid principal is supplied in authentication, the code 15404 is used. Impersonation of a Windows account also fails because the SQL Server service account and the Windows account’s domain do not have a full trust relationship.
Solution for Error SQL Server 15404
Verify that the Windows principal is there and that it is not misspelt.
If the error is caused by a lack of full trust between the SQL Server service account and the Windows account’s domain, one of the following actions can be taken to fix it:
For the SQL Server service, use a user account from the same domain as the Windows user.
If SQL Server uses a machine account such as Network Service /Local System, the domain holding Windows User must trust the machine.

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

SQL Server Error Code 15404 and solution summary

SQL Server Error: 15404
Severity: 16
Event Logged or not: No
Description:
Could not obtain information about Windows NT group/user ‘%ls’, error code %#lx.

Возможно, вам также будет интересно:

  • 1525f329 ошибка рено логан 2
  • 1525f328 ошибка рено сандеро
  • 1525f328 ошибка рено меган
  • 1525f3 ошибка рено логан
  • 15226 ошибка ауди q5

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии