问题描述
XP_CMDshell的替代品是什么?它在SQL Server中工作正常但是它在sql azure中不支持那么sql azure的替代方法是什么?
what is the alternative of XP_CMDshell ? it is working fine in sql serverbut it is not support in sql azureso what is alternative for sql azure ?
推荐答案
由于您要创建数据并将其上传/下载到平面文件或xml文件中,因此我认为您需要命令行访问权限才能访问BCP.
I assume you need command line access to access BCP since you are trying to create and upload/download data into a flat or xml file.
SQL Azure不提供对命令提示符的访问.将SQL Azure视为只是虚拟化的服务,而没有主机基础结构(虚拟的或物理的).由于BCP实际上是基于命令行的实用程序,因此您将无法从Azure对其进行访问.您需要在可以访问命令行的计算机上设置BCP(它是命令行实用程序的一部分).该计算机可能是本地计算机,也可能是Azure IaaS.您只能安装BCP组件.
SQL Azure does not provide access to a command prompt. Think of SQL Azure as just a virtualized service, without host infrastructure (Virtualized or physical). Since BCP is actually a command line based utility you won't have access to it from Azure. You'll want to setup BCP, which is part of the command line utilities, on a machine that does have access to command line. That machine might be either on-premise or Azure IaaS. You can install just the BCP component.
http://www.microsoft.com/zh-我们/download/details.aspx?id=36433
或者,如果您不想设置物理基础结构来完成此任务,则Azure数据工厂将能够完成在平面文件和数据库之间移动数据的任务.
Alternatively if you don't want to setup physical infrastructure to complete this, Azure Data Factory would be able to complete the task of moving data between flat files and databases.
这篇关于SQL Azure中的替代xp_cmdshell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!