Wednesday, March 7, 2012

Linked Server Access

Hi,
I am creating a linked server with
sp_addlinkedsrvlogin @.ServerAlias, 'TRUE', NULL, NULL, NULL
I am Creating a job with owner as my id.
When the job runs, it creates some internal clones of the job, the owner of
which is 'sa'.
execute @.ReturnCode = msdb.dbo.sp_add_job @.job_id = @.JobID output ,
@.job_name = @.szTargetJobName,
@.owner_login_name = N'sa', @.description = N'Autogenerated.',
@.category_name = N'RunTime Job',
@.enabled = 1
When these clones try to access the linked server, the job fails because of
the access permission issues for the 'sa' account on the linked server.
I am not able to figure out the reason for this.
What might be the reason and what will be the solution for this.
Thanks,
SwapHi
A default mapping between all logins on the local server and remote logins
on the linked server is automatically created by executing
sp_addlinkedserver, therefore you should not need to issue your
sp_addlinkedsrvlogin statement.
You may want to try droping the linked server and re-linking it or
specifically try mapping the sa accounts and see if it works.
Can you access the linked server through QA, or do you get an error message?
John
"swap@.@.@." wrote:
> Hi,
> I am creating a linked server with
> sp_addlinkedsrvlogin @.ServerAlias, 'TRUE', NULL, NULL, NULL
> I am Creating a job with owner as my id.
> When the job runs, it creates some internal clones of the job, the owner of
> which is 'sa'.
> execute @.ReturnCode = msdb.dbo.sp_add_job @.job_id = @.JobID output ,
> @.job_name = @.szTargetJobName,
> @.owner_login_name = N'sa', @.description = N'Autogenerated.',
> @.category_name = N'RunTime Job',
> @.enabled = 1
> When these clones try to access the linked server, the job fails because of
> the access permission issues for the 'sa' account on the linked server.
> I am not able to figure out the reason for this.
> What might be the reason and what will be the solution for this.
> Thanks,
> Swap

No comments:

Post a Comment