[英]xp_cmdshell Proxy not Executing
I created a Proxy account with Sysadmin access. 我创建了具有Sysadmin访问权限的代理帐户。 Users use this to execute a bcp command of their choosing. 用户使用它来执行自己选择的bcp命令。
However when the users want's to execute the proc they get: EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys' 但是,当用户希望执行proc时,他们得到: 对对象'xp_cmdshell',数据库'mssqlsystemresource',架构'sys'的EXECUTE权限被拒绝
Here is my Proc: 这是我的程序:
CREATE PROCEDURE spCMDProxy
(
@SQLSTATEMENT VARCHAR(1000),
@FILENAME VARCHAR(1000)
)
WITH ENCRYPTION
AS
BEGIN
DECLARE @PrepStatement VARCHAR(1000)
SET @PrepStatement = 'bcp ' + '"'+ @SQLSTATEMENT + '" queryout C:\SamsungEDI\' + @FILENAME + ' -U************ -P************ -c -t"||" -S UECZAERP01'
EXEC xp_cmdshell @PrepStatement
END
My Proxy account is a local Sysadmin account. 我的代理帐户是本地Sysadmin帐户。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.