March 14, 2008 at 12:03 pm
Hi Everyone,
I set up [Server2] as a linked server on my local [Server1]. We use Windows Authentication mode ( So I selected Be made using the login's current security context). I wrote a SP on my local to fetch data from the linked server [Server2] and insert into a table in my local database. This SP works fine through the SSMS. Now I am trying to run the same SP in a job. I created a EXECUTE T-SQL step in the job to execute this SP. Also, in the Advanced properties Tab for the step, I set RUN AS: MyDomain\MyLogin .
Inspite of all this, the job fails due to the following reasons.
Executed as user: MyDomain\MyLogin. Access to the remote server is denied because the current security context is not trusted. [SQLSTATE 42000] (Error 15274). The step failed.
Can somebody help me how i can get this job succeed?
March 14, 2008 at 12:17 pm
Although it appears both desirable, and doable...I've NEVER been able to get it to work this way. Every year I try again, see if either SQL or my environment has fixed the problem, but so far no luck.
What does work is to map your windows login to a SQL login on the linked server. For ad-hoc DBA use, you can map all the Windows DBA logins to sa on the other box. For application-specific use, I've created new application-specific SQL logins on the other box, then mapped appropriately.
March 14, 2008 at 2:08 pm
Thanks Mike. I'll see if it works for us. BTW, we created a SSIS Package to execute this SP. And ran this package as a job. That worked.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply