使用 xp_cmdshell 在 SQL Server 2008 中无法正确生成图像文件

发布于 2025-01-06 13:40:34 字数 325 浏览 3 评论 0原文

请帮助我解决这个问题,我尝试了几种选择,但到目前为止还没有成功,任何

帮助将不胜感激。

我正在 SQL Server 2008 上使用 xp_cmdshell 生成一个图像文件,执行此操作时,图像不会在 excel 文件中生成,在通过命令提示符和 SQL Server 2003 上运行相同图像时,会正确生成相同的图像。

因此,基于上述情况,我认为问题不在于代码,问题在于 SQL Server 2008 上与 xp_cmdshell 命令相关的某些设置。

您能否为我提供一些指导来解决此问题,如果您对此有任何疑问,请告诉我。

谢谢,

舒布

Please help me out to resolve this issue, I tried several options but unable to get success till now, any

help would be greately apprecaited.

I am generating one image file using xp_cmdshell on SQL Server 2008, the image is not getting generated in the excel file while doing this, the same image generates properly while running the same through command prompt and on SQL Server 2003.

So based on above scenario, I think the problem is not with the code, the problem is with some setting on SQL Server 2008 related to xp_cmdshell command.

Can you please provide me some guidance to resovle this issue, let me know if you have any questions on this.

Thanks,

Shoeb

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅沫记忆 2025-01-13 13:40:34

检查运行 sql server 的用户的 Windows 权限

在服务器级别禁止使用 xp_cmdshell

exec sp_configure 'xp_cmdshell'

检查是否通过命令 检查运行此命令的用户是否是系统管理员##xp_cmdshell_proxy_account##上设置了代理帐户

在此处查看更多信息

Check the windows permissions for user, under which the sql server is run

also

check if using xp_cmdshell is not prohibited on the server level by command

exec sp_configure 'xp_cmdshell'

and check that is user running this command is sysadmin or there is set proxy account on ##xp_cmdshell_proxy_account##

See more here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文