Linked servers cannot be used under impersonation without a mapping for the impersonated login
透過agent job執行linked server查詢會出現錯誤訊息:Linked servers cannot be used under impersonation without a mapping for the impersonated login
即使Linked server的Security 已設為 “Be made using the login's current security context",仍需為該login建立mapping :
USE [master]
GO
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'LinkedServerName', @locallogin = N'帳號', @useself = N'False', @rmtuser = N'', @rmtpassword = N'密碼'
GO