与AzureDB中的XP_CMDSHELL等效 [英] Equivalent of XP_CMDSHELL in AzureDB

查看:57
本文介绍了与AzureDB中的XP_CMDSHELL等效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将SQL Server作为MS Azure VM上的服务使用,我想在存储过程中使用 xp_cmdshell ,但收到以下错误/信息消息:

I'm using SQL Server as a service on a MS Azure VM and I would like to use xp_cmdshell in a stored procedure but I get the below error/information message:

模块'ProcExportFacturaEDI_Manual2'取决于缺少的对象'xp_cmdshell'.该模块仍将创建;但是,直到对象存在,它才能成功运行.

The module 'ProcExportFacturaEDI_Manual2' depends on the missing object 'xp_cmdshell'. The module will still be created; however, it cannot run successfully until the object exists.

我在线阅读,发现在MS Azure中无法正常工作.有谁知道它的等效功能或如何在Azure中使用它?

I read online and find out that in MS Azure is not working. Does anyone know what's the equivalent of it or how can I use it in Azure?

编辑

我确实安装了它,但是我收到以下消息,并且应该导出的文件不存在:

I did install it, but I get the below message and the file that should be exported, is not there:

(受影响的1行)讯息2812,第16级,州立62,第119行找不到存储过程'xp_cmdshell'.

(1 row(s) affected) Msg 2812, Level 16, State 62, Line 119 Could not find stored procedure 'xp_cmdshell'.

推荐答案

Azure SQLDB不支持 xp_cmdshell .句号没有等价的",因为Azure SQLDB在共享环境中运行,而无需访问主机,这不同于对本地实例习惯使用的独立,完全访问主机环境.

Azure SQLDB does not support xp_cmdshell. Full stop. There is no "equivalent" because Azure SQLDB runs in a shared environment without access to the host unlike the standalone, full access to the host environment you're used to with your on-premises instances.

您将需要重写存储过程以不使用它.我们无法告诉您等效"的含义,因为我们无权访问您的存储过程,也不知道要求.

You will need to rewrite your stored procedure to not use it. We cannot tell you what the "equivalent" would be because we do not have access to your stored procedure, nor do we know the requirements.

如果无法避免使用 xp_cmdshell ,则Azure SQLDB可能不适合您.您将需要设置在Azure(IaaS)上运行SQL Server的VM.

If you cannot avoid using xp_cmdshell, then Azure SQLDB may not be for you. You'll want to look at setting up a VM running SQL Server on Azure (IaaS).

这篇关于与AzureDB中的XP_CMDSHELL等效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆