调用MSSQLSERVER的系统过程xp_cmdshell发生错误:xpsql.cpp: 错误 来自 GetProxyAccount

当尝试调用MSSQLSERVER的系统过程xp_cmdshell时,出现50001错误。该错误通常表明SQL Agent账户不是本地管理员账户或者未设置代理账户。解决方案包括在SQL Server代理的“作业系统”属性中重置代理账户,确保指定的本地服务器账户存在,并考虑安全风险。可以使用特定的SQL语句检查和设置代理账户。
摘要由CSDN通过智能技术生成
--消息 50001,级别 1,状态 50001
--xpsql.cpp: 错误 87 来自 GetProxyAccount(第 604 行)

打开SQLSERVER的企业管理器,进入“管理”,右键点击“Sql Server代理”点击属性;
首先你要“允许非SysAdmin权限的用户执行CmdExec.....”,然后指定一个账号。
不过,你需要意识到这样做所存在的安全上的风险。

有关英文回复:

You don't have to use a domain account.  When you go into the  "job system" properties on your sql agent, click the "reset proxy account".  it will ask you for a new user/password and domain.  For the domain, just put the name of the local server (of course, that account has to exist on the local server).
Also, I'm sure you know what the risk is by allowing non-syadmins the ability to execute XP_CMDSHELL....


可以使用下面的语句来获取当前的代理所使用的账号:
exec master.dbo.xp_sqlagent_proxy_account N&#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值