August 7, 2008 at 5:56 am
hi,
i have two linked servers..whenever i execute Stored proc on linkedcserver ,it gives error
Msg 18456, Level 14, State 1, Line 1
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
on both server's sql agent , i have same login with same rights.
If i use sql authentication it runs fine but if i set a job to execute it it gives above error
how to get rid of this ?
please help me
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
August 7, 2008 at 11:09 am
To run as a job:
Start your Agent on a domain account. Add this account to both SQL Servers with the appropriate rights to the databases before you start Agent on this account. Add this account to Linked Server Logins and test.
Let us know if it helped.
P.S. - the domain account has to have "Passowrd Never Expires" if you want to use this setup for a long time without worries that your Agent would not start when password expires.
Regards,Yelena Varsha
August 8, 2008 at 12:38 am
hi
thanks for the reply.
actually i tried your suggestion but it couldn't work
i will elaborate more about the problem.
first server has sql agent login : DOMAIN\sqlman (sysadmin)
AND
second server has its sql agent login : DOMAIN\sqlman (sysadmin)
Actually on running Stored proc manually it works fine but when i run it in JOB
it gives error :
Executed as user: DOMAIN\SQLMan. Login failed for user 'DOMAIN\bkumar'. [SQLSTATE 28000] (Error 18456).
Here,
DRIVENAME\bkumar is server windows login which has adminstrative rights on both servers
please suggest
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
August 8, 2008 at 12:45 am
just a suggestion to check,
When you created the linked server have to given the permission to NT\WindowsUser ?
August 8, 2008 at 12:48 am
Actually no...can you tell me procedure to check it ?
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
August 8, 2008 at 6:46 am
Can you check it in a way, by creating sql login on the 2nd server, and then map this sql login to the sql agent login on the instance where you scheduled your job?
Tariq
master your setup, master yourself.
http://mssqlsolutions.blogspot.com
August 8, 2008 at 7:03 am
hey,
actually i have 2 servers.
i want to schedule a job on server A which will excute a query on linked server (server B)
i m using sql login : DOMAIN\sqlman( sysadmin) on both servers
and sql agent login\service login : DOMAIN\sqlman
and
as far as i know we cant start a job on sql authentication mode....can we ,if yes then tell me which property or seeting i need to enable
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
August 11, 2008 at 9:45 am
On the Security tab of Linked Server properties you have to add your DOMAIN\sqlman login as Local Login and check Impersonate checkbox or add a remote server's valid login name and pw
Regards,Yelena Varsha
October 8, 2010 at 1:04 pm
Create and add a domain account on both the servers and then add the linked server with
"Be made using this security context" using this domain account.
August 12, 2013 at 8:41 am
Try changing the job owner to sa, or something with very high level permissions. Usually the job will take the owner of who created it.
If the service account you use is not a domain admin, the anonymous login error is usually related to the service account used for sql not being able to register the spn and also not having delegation setup.
The anonymous logon message ("Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON") was resolved by making two changes to the AD environment.
•Allowed the service account to "write public information” to self.
•Allowed Kerberos delegation to any on the service account then stopped the SQL Service and started it again.
Used setspn -L MSSQLSvc/myhost.redmond.microsoft.com:1433 accountname to check for registration. -- example only
After this was successful I checked SQL authentication between servers using
SELECT auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@spid to make sure it said Kerberos.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply