Wednesday, March 28, 2012

running a stored procedure from one server to access jobs on another

I have two servers linked. I can run an SP on one server to access jobs on
the other server. I cannot make this work the other way around?
this works from server1
server2.msdb..sp_update_job @.job_name = 'Copy And Restore FFICDB Trans
Logs',@.enabled =1
This fails with the error msg Could not connect to server 'server1' because
'sa' is not defined as a remote login at the server.
server1.msdb..sp_update_job @.job_name = 'Copy And Restore FFICDB Trans
Logs',@.enabled =1Did you map logins from server 2 to server 1? Also, it seems you login as sa
on server 2, I never
recommend anyone logging in as sa.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Andy Phillips" <andy.phillips@.callatg.com> wrote in message
news:%23eH52BB2EHA.3820@.TK2MSFTNGP11.phx.gbl...
> I have two servers linked. I can run an SP on one server to access jobs o
n
> the other server. I cannot make this work the other way around?
> this works from server1
> server2.msdb..sp_update_job @.job_name = 'Copy And Restore FFICDB Trans
> Logs',@.enabled =1
> This fails with the error msg Could not connect to server 'server1' becaus
e
> 'sa' is not defined as a remote login at the server.
> server1.msdb..sp_update_job @.job_name = 'Copy And Restore FFICDB Trans
> Logs',@.enabled =1
>|||All I did was link the servers.Please explain what I should do.
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:Obs8SCE2EHA.2568@.TK2MSFTNGP11.phx.gbl...
> Did you map logins from server 2 to server 1? Also, it seems you login as
sa on server 2, I never
> recommend anyone logging in as sa.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Andy Phillips" <andy.phillips@.callatg.com> wrote in message
> news:%23eH52BB2EHA.3820@.TK2MSFTNGP11.phx.gbl...
on[vbcol=seagreen]
because[vbcol=seagreen]
>|||If you use EM, right.click the linked server, Properties, and the security t
ab. Map the login there.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Andy Phillips" <andy.phillips@.callatg.com> wrote in message
news:%23ogJfYJ2EHA.2624@.TK2MSFTNGP11.phx.gbl...
> All I did was link the servers.Please explain what I should do.
> Thanks
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:Obs8SCE2EHA.2568@.TK2MSFTNGP11.phx.gbl...
> sa on server 2, I never
> on
> because
>

No comments:

Post a Comment