Click here to Skip to main content
16,016,537 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,


I have created Stored Procedure for insert data from local to Remote database in Sqlserver. It's working fine when i execute directly, but It's failed when i have executed through Job.

Note : Source Database : sqlserver2012, Destination Database : Sqlserver2005

How to Resolve this Issue.

Please reply as early as possible.


Thanks in Advance....
Posted
Comments
AnvilRanger 10-Aug-15 8:52am    
And did you receive any errors when executing the job?
swathi(MCA) 11-Aug-15 0:20am    
I got error when executing the job. The error is "Executed as user: NT SERVICE\SQLSERVERAGENT.
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [SQLSTATE 28000] (Error 18456). The step failed."
swathi(MCA) 11-Aug-15 0:39am    
After login linked server (Remote server), the job is running successfully.

For login linked server execute the below procedure :
"EXEC sp_addlinkedsrvlogin 'servername', 'false', NULL, 'username', 'password'"


Roshan 11862764 10-Aug-15 14:45pm    
Specify complete name of the database objects in the SP
Databasename.SchemaName.TableName

1 solution

I got error when executing the job. The error is "Executed as user: NT SERVICE\SQLSERVERAGENT.
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [SQLSTATE 28000] (Error 18456). The step failed."


The solution :

After login linked server (Remote server), the job is running successfully.

For login linked server execute the below procedure :
" EXEC sp_addlinkedsrvlogin 'servername', 'false', NULL, 'username', 'password' "
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900