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

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

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

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

日期 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

 

相关文章
|
9月前
|
人工智能 JavaScript 开发工具
极速上手!Claude Code 原生支持 Windows 免WSL安装教程
Claude Code 现已支持 Windows 原生运行,无需 WSL 配置。本文提供详细安装教程,涵盖 Node.js 环境验证、Git 安装及 Claude Code 配置步骤,助你快速上手这一强大 AI 编程工具。
12703 13
|
9月前
|
运维 安全 网络安全
Windows Server 2019拨号“找不到设备”?Error 1058解决指南
Windows Server 2019拨号报错1058?别急!这不是硬件故障,而是关键服务被禁用。通过“服务依存关系”排查,依次启动“安全套接字隧道协议”“远程接入连接管理”和“路由与远程访问”服务,仅需4步即可恢复PPPoE或VPN拨号功能,轻松解决网络中断问题。
659 1
|
Linux Windows
Linux01---目录结构,Linux系统下只有一个最顶级的树/,Windows系统有盘符概念,而Linux系统没有盘符概念,整个系统都在/根目录下,Linux 系统写法 /user/local
Linux01---目录结构,Linux系统下只有一个最顶级的树/,Windows系统有盘符概念,而Linux系统没有盘符概念,整个系统都在/根目录下,Linux 系统写法 /user/local
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
377 1
|
SQL 安全 流计算
Flink SQL 在快手实践问题之Group Window Aggregate 中的数据倾斜问题如何解决
Flink SQL 在快手实践问题之Group Window Aggregate 中的数据倾斜问题如何解决
370 1
|
资源调度 编译器 Linux
Windows10系统安装Truffle框架,安装失败,提示:error An unexpected error occurred: “https://xxxxx
Windows10系统安装Truffle框架,安装失败,提示:error An unexpected error occurred: “https://xxxxx
573 0
|
Linux Python Windows
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
323 0
|
SQL 数据库
SQL GROUP BY 语句
SQL GROUP BY 语句
240 0