Sqlcmd: Login failed for user 'NT AUTHORITY \ ANONYMOUS LOGON'

I have privilege to connect to db on test2, but if I delete the desktop on another host using the same account and run the following command there

SQLCMD -E -S test2 -d test -i Silo.sql -b -v

(affected 1 line) Msg 18456, level 14, state 1, server test \ colo, line 1
Login failed for user 'NT AUTHORITY \ ANONYMOUS LOGON' .

Why is this happening, and what is the workaround?

And strangely enough, he complains that the user is "NT AUTHORITY \ ANONYMOUS LOGON", but in fact I used my own account

+3
source share
3 answers

,

( , ANONYMOUS)

( 1 ) Msg 18456, 14, 1, Server test\colo. 1 "NT AUTHORITY\ANONYMOUS LOGON".

, script test test\colo, , test\colo , , sp_addlinkedsrvlogin

+3

SQL Server 2005 . . SQL Server

" SQL Linked Server " ... ""

( ).

, Windows SQL Server .

0

SQLCMD sysamdin.

EXEC master..sp_addsrvrolemember @loginame = N'NT SERVICE\MSSQLSERVER ', @rolename = N'sysadmin'

0

Source: https://habr.com/ru/post/1788773/


All Articles