question

jhunu avatar image
jhunu asked

linked server

I have a JOB in sql server 2005.The job has a step where in it is using a linked server for fetching values from remore server and insert in the current server . The script in the job when executed manually in a query analyser it executes as expected. But the same job when executed it give error message as The table either does not exist or the current user does not have permissions on that table. [SQLSTATE 42000] . Since its existing on the linked server due to which the script execute in the query analyser . But why does it throws error in the sql JOBS
sql-server-2005linked-server
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yeah, Linked Server? Whats next? :) I think you forgot to add details.
0 Likes 0 ·

1 Answer

· Write an Answer
Usman Butt avatar image
Usman Butt answered
Most probably, as stated in the error message, it could be the user permission issue. The SSMS user would have the necessary rights, but the Job / Task user would not have the permissions. Either, use the same user as used in SSMS for the job or change your linked server configuration to use a specific user credentials while connecting to the linked server. Whatever suits your environment.
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

The job has appropriate rights?? Do you know who is the owner of the Job/specific task? Is it the same user used in the SSMS? Please keep in mind that Jobs by default would run under SQL Service Agent service account, if no specific user is supplied.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.