SQL Server 2008 中用户“NT AUTHORITY\ANONYMOUS LOGON"登录失败 [英] Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' in SQL Server 2008

查看:116
本文介绍了SQL Server 2008 中用户“NT AUTHORITY\ANONYMOUS LOGON"登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用如下文件执行脚本:

I am executing a script by using file like below:

EXEC master.dbo.xp_cmdshell 'sqlcmd -d TE07 -S 服务器名称 -i D:\TE07.sql'

EXEC master.dbo.xp_cmdshell 'sqlcmd -d TE07 -S ServerName -i D:\TE07.sql'

执行上述行时,出现以下错误:

When executing the above line I am getting the below error:

Msg 18456, Level 14, State 1, Server WIN-T7NMRSDEBNP, Line 1
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

我读了很多,但我不清楚这一点.在许多文章中,它被定义为 LinkedServer 问题.任何人都可以请推荐我.

I have read a lot but I am not clear about this. In many articles it is define as a LinkedServer issue. Can anyone please suggest me.

推荐答案

我们在使用 cmdshell 执行 sql 文件时也必须使用用户名和密码:

We have to use username and password also while executing the sql file using cmdshell:

EXEC master.dbo.xp_cmdshell ‘sqlcmd -D db_name -S server_name -U username -P password -i sqlfile’

使用上述格式

这篇关于SQL Server 2008 中用户“NT AUTHORITY\ANONYMOUS LOGON"登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆