MS SQL Could not obtain information about Windows NT group/user 'domain\login', error code 0x5. [SQLSTATE 42000] (Error 15404)

本文涉及的产品
RDS SQL Server Serverless,2-4RCU 50GB 3个月
推荐场景:
云数据库 RDS SQL Server,独享型 2核4GB
简介: 最近碰到一个有趣的错误:海外的一台数据库服务器上某些作业偶尔会报错,报错信息如下所示: ---------------------------------------------------------------------------------------------------------...

最近碰到一个有趣的错误:海外的一台数据库服务器上某些作业偶尔会报错,报错信息如下所示:

-------------------------------------------------------------------------------------------------------------------------------------------------

日期 2013/9/15 12:00:00

日志 作业历史记录 (JOB_SYNCHRONIZING_ESCM_DATA_EAV)

步骤 ID 0

服务器 EGVNT02

作业名称 JOB_SYNCHRONIZING_ESCM_DATA_EAV

步骤名称 (Job outcome)

持续时间 00:04:34

SQL 严重性 0

SQL 消息 ID 0

已通过电子邮件通知的操作员

已通过网络发送通知的操作员

已通过寻呼通知的操作员

重试次数 0

消息

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

-------------------------------------------------------------------------------------------------------------------------------------------------

 

 该数据库版本为Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)  ,使用domain\login创建的作业,该domain\login拥有sysadmin服务器角色,但是该服务器所属的是domain A, 而且不属于该系统下的Administator组成员。关于该数据库相关服务的登录账号如下所示:

clip_image002

 从网上搜索到资料如下所示:

This message is thrown if the SQL Server service uses an account that does not have sufficient administrative credentials on the Windows domain. In this situation, the xp_logininfo system stored procedure is run by using the security context of the SQL Server service. Because the account does not have sufficient administrative credentials to enumerate the properties of the user in the domain, the xp_logininfo system stored procedure fails, and you receive the 8198 error. To resolve this problem, change the startup account of the SQL Server service to a Windows domain account.

We need to either run the SQL service under domain account or use SQL authentication

 

翻译如下(仅供参考)如果SQL Server服务使用的帐户没有足够管理凭据,将会抛出此错误消息。对Windows域。在这种情况下,xp_logininfo系统存储过程使用SQL Server服务的安全上下文中运行。因为帐户没有足够的安全凭据,枚举用户在域的属性,xp_logininfo系统存储过程失败,您会收到8198错误。为了解决这个问题,更改SQL Server服务的启动帐户到Windows域帐户。

我们需要用域帐户或使用SQL身份验证运行SQL服务。

其实要解决这个问题也很方便,只需将作业的owner改为sa或本地域下拥有sysadmin角色的账号即可解决问题。但是对问题的本质还是迷糊,为什么大部分时候就能成功执行,偶尔就会出现这个错误呢?这点一直没让我弄明白。

 

参考资料:

http://www.sqldbadiaries.com/2011/02/25/unable-to-determine-if-the-owner-of-job-has-server-access/

http://www.sqlserver-wiki.com/2012/11/could-not-obtain-information-about.html

 

相关实践学习
SQL Server on Linux入门教程
SQL Server数据库一直只提供Windows下的版本。2016年微软宣布推出可运行在Linux系统下的SQL Server数据库,该版本目前还是早期预览版本。本课程主要介绍SQLServer On Linux的基本知识。 相关的阿里云产品:云数据库RDS SQL Server版 RDS SQL Server不仅拥有高可用架构和任意时间点的数据恢复功能,强力支撑各种企业应用,同时也包含了微软的License费用,减少额外支出。 了解产品详情: https://www.aliyun.com/product/rds/sqlserver
相关文章
|
2月前
|
SQL 关系型数据库 MySQL
SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet', sys...
SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet', sys...
|
2月前
|
SQL Java 关系型数据库
实时计算 Flink版操作报错之如何处理从源表插入数据到结果表报错误:[ERROR] Could not execute SQL statement.
在使用实时计算Flink版过程中,可能会遇到各种错误,了解这些错误的原因及解决方法对于高效排错至关重要。针对具体问题,查看Flink的日志是关键,它们通常会提供更详细的错误信息和堆栈跟踪,有助于定位问题。此外,Flink社区文档和官方论坛也是寻求帮助的好去处。以下是一些常见的操作报错及其可能的原因与解决策略。
|
4天前
|
SQL 存储 关系型数据库
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
|
4天前
|
SQL 关系型数据库 MySQL
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
|
2月前
|
SQL 数据采集 关系型数据库
如何解决MySQL报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL?
如何解决MySQL报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL?
|
2月前
|
SQL 关系型数据库 MySQL
MySQL SQL error: #1271 - Illegal mix of collations for operation ‘UNION‘
MySQL SQL error: #1271 - Illegal mix of collations for operation ‘UNION‘
|
2月前
|
Docker Windows 容器
Windows Docker Desktop 无法启动 自动退出报错信息为:Docker Desktop -Unexpected WsL error An unexpected error was e
Windows Docker Desktop 无法启动 自动退出报错信息为:Docker Desktop -Unexpected WsL error An unexpected error was e
120 0
|
8月前
|
Docker Windows 容器
Docker在win10上报错,error during connect: In the default daemon configuration on Windows
Docker在win10上报错,error during connect: In the default daemon configuration on Windows
206 0
|
2月前
|
SQL 数据库
导入 sql 文件,如果发生 ERROR 1046 (3D000) no database selected 错误
导入 sql 文件,如果发生 ERROR 1046 (3D000) no database selected 错误
20 0
|
2月前
|
SQL JSON Kubernetes
Seata常见问题之服务端 error日志没有输出,客户端执行sql报错如何解决
Seata 是一个开源的分布式事务解决方案,旨在提供高效且简单的事务协调机制,以解决微服务架构下跨服务调用(分布式场景)的一致性问题。以下是Seata常见问题的一个合集
188 0