Re: 2 Urgent Problems need to solve

From: Andrew John (aj_at_DELETEmistrose.com)
Date: 08/31/04


Date: Tue, 31 Aug 2004 16:06:33 +1000

Devil Garfield wrote:

> Dear Experts,
>
> Case description:
> At the local server (Server A), I have created a stored procedure (SP) to
> get the data from 2 oversea servers (Server B and C) and insert the result
> data in a table of Server A; So I create a scheduled daily job to run that
> SP, but I found that it failed on execution. Firstly I supposed it's the
> error on the SP, but it works perfect (??)while I run the script (in SP) at
> the SQL Query Analyer.
>
> Question:
> 1. Is the SQL Server don't permit user to use a SP to get the data from
> another server & insert data into the table on the local server ??
>
> 2. How can we trace the error which occur on the job execution ??
> (Because I just see the this on the job history - <The job failed. The Job
> was invoked by User sa. The last step to run was step 1 (Update Table).>)
>
> Thanks a lot & a lot for all of your concern & helping !!!
>
> Best Regards,
> Devil Garfield

You (or your windows account) are probably an administrator on all the
servers, so your windows credentials get you mapped to "sa" on the
overseas servers.

The SQL Agent service may be running in a different account, and that
account is not sufficiently privileged on the remote servers. Hope not
anyway or your security is a bit of a worry.

Assuming you are using integrated security, I have found that logging on
to the local machine, with the account that SQL Agent is running under,
and testing in Query Analyser is a good diagnostic tool. If it works
there, then it normally works in a SQL Job.

It's also normal and sane, for the remote server admin to have granted a
specific restricted account access to only a specific stored procedure
in a specific database.

If you provide more complete information you will get a better answer:

a) Integrated Security ?
b) Accounts that SQL Server and SQL agent are running under
c) Linked Servers or openrowset ?
d) How the servers are linked - there are several options
e) Database access / Object Permissions granted to the mapped user ?
f) How the NT security is linked - same domain, trust ...
g) The text of the stored procedure
...

Or check Books Online security topics.

Regards
  AJ



Relevant Pages

  • Re: Distributing user-developed Linux software and licensing issues.
    ... Aside from server security, there is the ... application can be completely open source and secure ... account from a specific machine. ... Do open source web servers include the full source to ...
    (Fedora)
  • Re: Delegation problems
    ... What account is running SQL? ... appropriate SPNs. ... then it depends on how you are connecting to SQL. ... I have several other servers running SQL and the SQL ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to run aspnet with system account
    ... Well, darn, Joseph. ... considering the "lack of security" ... Even if you only run your own code on your servers, ... >> Telling people that you CAN safely run ASP.Net under the System account ...
    (microsoft.public.dotnet.security)
  • Re: How to run aspnet with system account
    ... Well, darn, Joseph. ... considering the "lack of security" ... Even if you only run your own code on your servers, ... >> Telling people that you CAN safely run ASP.Net under the System account ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Finding out admin username
    ... configured in the Security Options on the servers: ... Network access: Do not allow anonymous enumeration of SAM accounts - Enabled ... The administrator account has a set SID no matter what you rename the ...
    (microsoft.public.win2000.security)