Re: bcp error

From: John (John_at_discussions.microsoft.com)
Date: 01/14/05


Date: Fri, 14 Jan 2005 13:43:05 -0800

I executed the following:
xp_sqlagent_proxy_account n'get'

It returned an account. I checked the account and it was a member of the
sysadmin role.

To me, it seems like it should be working.

"Andrew J. Kelly" wrote:

> Whether it is a job or not still has the requirement of who is trying to
> execute xp_cmdshell will determine what account gets used. IN SQL 2000 if
> that user is a member of the sa role it will use the account that SQL Agent
> is running under. If not it will attempt to use the account that is set for
> the Proxy account of SQL Agent. The proxy account most likely does not have
> the right permissions. From BOL under xp_cmdshell:
>
> When xp_cmdshell is invoked by a user who is a member of the sysadmin fixed
> server role, xp_cmdshell will be executed under the security context in
> which the SQL Server service is running. When the user is not a member of
> the sysadmin group, xp_cmdshell will impersonate the SQL Server Agent proxy
> account, which is specified using xp_sqlagent_proxy_account. If the proxy
> account is not available, xp_cmdshell will fail. This is true only for
> Microsoft® Windows NT® 4.0 and Windows 2000. On Windows 9.x, there is no
> impersonation and xp_cmdshell is always executed under the security context
> of the Windows 9.x user who started SQL Server.
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "John" <John@discussions.microsoft.com> wrote in message
> news:6C2F8E62-E43B-49AD-8815-C37A56A2FA6E@microsoft.com...
> >I don't know if this helps answer your question, but it does not run as a
> > job. It is running through a stored procedure. DBO is the ower of the
> > stored procedure.
> >
> > "Andrew J. Kelly" wrote:
> >
> >> Who is the owner of the job? If it is not sa then you will use the
> >> account
> >> setup for the Proxy. See this:
> >> http://www.support.microsoft.com/?id=269074
> >>
> >> --
> >> Andrew J. Kelly SQL MVP
> >>
> >>
> >> "John" <John@discussions.microsoft.com> wrote in message
> >> news:213D9833-AFC6-4122-8BCC-DFEB1BAF945D@microsoft.com...
> >> >I am getting an error that I can't open the host file when running bcp
> >> > through a tsql statement. When I set the path to a local drive on the
> >> > sql
> >> > server the utility runs. However, when I set the path to a unc path
> >> > that
> >> > the
> >> > server and service account both have permission to then it won't run.
> >> >
> >> > Any ideas on what I should try to fix this problem?
> >>
> >>
> >>
>
>
>



Relevant Pages

  • Re: xp_cmdShell
    ... checkbox under SQL Server Agent properties --> Job ... System) and specify a Windows account for the SQL Agent proxy with the ... > I thought if he has execute permission for my sp, which owner is DBO, that ... If I set the execute permission for 'xp_cmdshell' to my read user I get the ...
    (microsoft.public.sqlserver.programming)
  • Re: proper permissions for aspnetdb membership access
    ... Windows built-in account. ... application's application pool to execute the T-SQL statements. ... Open your SQL Server Management Studio with a local ... If it does not exist in the logins of your SQL Server ...
    (microsoft.public.sqlserver.setup)
  • Re: sql problem
    ... Account # is the link field on ... The requirement is I have to come up with a report comparing the two ... customer tables to see if they are in sync. ... what I wanted to do was to get the SQL to return the "like" names ...
    (comp.databases.oracle.server)
  • Re: sql problem
    ... Account # is the link field on ... table1, table2@dblink where ....) ... customer tables to see if they are in sync. ... what I wanted to do was to get the SQL to return the "like" names ...
    (comp.databases.oracle.server)
  • Re: sql problem
    ... Account # is the link field on ... table1, table2@dblink where ....) ... customer tables to see if they are in sync. ... what I wanted to do was to get the SQL to return the "like" ...
    (comp.databases.oracle.server)