Tuesday, March 27, 2012

error 1813 with xp_cmdshell

Hi all,
I am trying to launch a xp_cmdshell from a stored procedure to execute a BCP
.
This error occured when my sp is called :
System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. -->
System.Data.SqlClient.SqlException: A severe error occurred on the current
command.
The results, if any, should be discarded. xp_cmdshell failed to execute,
error 1813 occured while executing CreateProcessAsUserW.
I use SQLServer 2000 SP4 and a system account to launch the xp_cmdshell. The
SQL server agent log on with this same account.
Any idea?
I will appreciate any help.
Regards.
LGHi,
xp_cmdshell executes with the security contect of the SQL Agent Proxy
account when executed by non symin users. This requires you to allow
non-symin users to execute xp_cmdshell (uncheck the 'Only users with
symin privileges...' checkbox under SQL Server Agent properties --> Job
System) and specify a Windows account for the SQL Agent proxy with the
permissions needed to run you application).
See the below URL:-
http://support.microsoft.com/defaul...b;en-us;Q264155
Thanks
Hari
SQL Server MVP
"Laurent G" <LaurentG@.discussions.microsoft.com> wrote in message
news:13FBAEA9-A146-49E0-A42C-1B939CC3DA06@.microsoft.com...
> Hi all,
> I am trying to launch a xp_cmdshell from a stored procedure to execute a
> BCP.
> This error occured when my sp is called :
> System.Web.HttpUnhandledException: Exception of type
> System.Web.HttpUnhandledException was thrown. -->
> System.Data.SqlClient.SqlException: A severe error occurred on the current
> command.
> The results, if any, should be discarded. xp_cmdshell failed to execute,
> error 1813 occured while executing CreateProcessAsUserW.
> I use SQLServer 2000 SP4 and a system account to launch the xp_cmdshell.
> The
> SQL server agent log on with this same account.
> Any idea?
> I will appreciate any help.
> Regards.
> LG|||Thanks a lot Hari, it works now.
"Hari Pra" wrote:

> Hi,
> xp_cmdshell executes with the security contect of the SQL Agent Proxy
> account when executed by non symin users. This requires you to allow
> non-symin users to execute xp_cmdshell (uncheck the 'Only users with
> symin privileges...' checkbox under SQL Server Agent properties --> Job
> System) and specify a Windows account for the SQL Agent proxy with the
> permissions needed to run you application).
> See the below URL:-
> http://support.microsoft.com/defaul...b;en-us;Q264155
>
> Thanks
> Hari
> SQL Server MVP
> "Laurent G" <LaurentG@.discussions.microsoft.com> wrote in message
> news:13FBAEA9-A146-49E0-A42C-1B939CC3DA06@.microsoft.com...
>
>

1 comment:

Post a Comment