首页 \ 问答 \ 无法在SQL中创建外部数据源(Can't CREATE EXTERNAL DATA SOURCE in SQL)

无法在SQL中创建外部数据源(Can't CREATE EXTERNAL DATA SOURCE in SQL)

我正在尝试创建一个外部数据源来访问Azure Blob存储。 但是,我在创建实际数据源时遇到问题。

我按照此处的说明操作: 在azure blob存储中批量访问数据创建外部数据源的 示例 - transact sql 。 我在使用Windows身份验证的客户端计算机上通过SSMS访问的VM上使用SQL Server 2016而没有任何问题。 说明说创建此外部数据源适用于SQL Server 2016和Azure Blob存储。

我创建了万能钥匙:

CREATE MASTER KEY ENCRYPTION BY PASSWORD = <password>

和,数据库范围的凭据

CREATE DATABASE SCOPED CREDENTIAL UploadCountries  
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = <key>;

我通过查询sys.symmetric_keys和sys.database_scoped_credentials验证了数据库中存在的这两种情况。

但是,当我尝试执行以下代码时,它说'EXTERNAL'附近的语法不正确

CREATE EXTERNAL DATA SOURCE BlobCountries
WITH  (
    TYPE = BLOB_STORAGE,
    LOCATION = 'https://<somewhere>.table.core.windows.net/<somewhere>', 
    CREDENTIAL = UploadCountries  
);

感谢您的想法和帮助!

史蒂夫。


I'm trying to create an external data source to access Azure Blob Storage. However, I'm having issues with creating the actual data source.

I've followed the instructions located here: Examples of bulk access to data in azure blob storage and Create external data source - transact sql. I'm using SQL Server 2016 on a VM accessing via SSMS on a client machine using Windows Authentication with no issues. Instructions say creating this external data source works for SQL Server 2016 and Azure Blob Storage.

I have created the Master Key:

CREATE MASTER KEY ENCRYPTION BY PASSWORD = <password>

and, the database scoped credential

CREATE DATABASE SCOPED CREDENTIAL UploadCountries  
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = <key>;

I have verified both of these exist in the database by querying sys.symmetric_keys and sys.database_scoped_credentials.

However, when I try executing the following code it says 'Incorrect syntax near 'EXTERNAL'

CREATE EXTERNAL DATA SOURCE BlobCountries
WITH  (
    TYPE = BLOB_STORAGE,
    LOCATION = 'https://<somewhere>.table.core.windows.net/<somewhere>', 
    CREDENTIAL = UploadCountries  
);

Your thoughts and help are appreciated!

Steve.


原文:https://stackoverflow.com/questions/46739126
更新时间:2022-04-25 07:04

最满意答案

你可以使用White实现这一点。

它使您能够以编程方式模拟与Win32,WinForms,WPF,Silverlight和SWT应用程序的用户交互。 我在几年前首次使用它时,可以在WinForms应用程序上自动执行一些简单的冒烟测试并获得巨大成功。

(警告:这是基于我之前的用法,所以现在可能会略有不同)

我创建了一些代码来启动我的应用程序并按名称查找一系列控件。 一旦找到,就可以操纵每个控件(例如输入文本,点击按钮等等)。 要查找控件的名称,请使用类似Spy ++(Win32),UISpy(WinForms)或Snoop(WPF)的内容来检查正在运行的应用程序。


You could achieve this using White.

It enables you to programmatically simulate user interaction with Win32, WinForms, WPF, Silverlight and SWT applications. I used it years ago when it first can out to automate some simple smoke tests on a WinForms application with great success.

(Caveat: this is based on my usage a while ago, so it may be slightly different now)

I created some code to launch my application and find a series of controls by name. Once found, each control could be manipulated (e.g. text entered, button clicked, etc...). To find the name of the controls, use something like Spy++ (Win32), UISpy (WinForms) or Snoop (WPF) to inspect the running application.

相关问答

更多
  • Google昨天发布了适用于iOS的全新Maps SDK。 可以在此处找到: https : //developers.google.com/maps/documentation/ios/ Google released their new Maps SDK for iOS yesterday. It can be found here: https://developers.google.com/maps/documentation/ios/
  • 您正在循环加载$list $list = array("id" => $id, .....); 每次都在循环写入$list ! 将此行更改为 $list[] = array("id" => $id, .....); 现在,您将创建一个数组数组,其中包含循环数据的所有结果。 You are loading $list in a loop so $list = array("id" => $id, .....); is over writing $list each time round the ...
  • 我前几天就Google Maps API密钥问了一个类似的问题 。 我的想法是,是否值得担心有人使用我的通话津贴。 一致认为,API旨在以这种方式使用,并且您无法做很多事情。 如果你的API要求你的域名作为带有API密钥的引用者标题(Google地图确实如此),那我认为这提供了一定程度的威慑力。 I asked a similar question the other day with regards to the Google Maps API key. My thought was whether it ...
  • 虽然斯蒂芬是对的 ,但他只专注于最可能的错误并让你处理其他一切。 我将在我的回答中尝试扩展这一点。 在查询字符串中使用ID建模URL API的URL非常复杂,每次需要时复制粘贴都很麻烦。 最好将URL处理放在一个地方,实现这一目的的一种方法是使用简单的服务 。 // The API service to use everywhere you need the API specific data. app.API = { protocol: 'https', domain: 'api.xxxx ...
  • 为了使用猫鼬保存文档,您需要首先指定模式。 //product-model.js var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ProductSchema = new Schema({ name: String, price: String, //And all other data you need }); var Product = mongoose.model('Product ...
  • 那么,这告诉你如何通过Python连接到MySQL: 如何用Python连接到MySQL数据库? 这告诉您如何通过Python使用REST API: 如何使用Python从RESTful服务获取JSON数据? 您可以通过UDF从MySQL访问REST API ,但这不是应该放在数据库中的那种逻辑。 Well, this tells you how to connect to MySQL via Python: How do I connect to a MySQL Database in Python? A ...
  • 你可以使用White实现这一点。 它使您能够以编程方式模拟与Win32,WinForms,WPF,Silverlight和SWT应用程序的用户交互。 我在几年前首次使用它时,可以在WinForms应用程序上自动执行一些简单的冒烟测试并获得巨大成功。 (警告:这是基于我之前的用法,所以现在可能会略有不同) 我创建了一些代码来启动我的应用程序并按名称查找一系列控件。 一旦找到,就可以操纵每个控件(例如输入文本,点击按钮等等)。 要查找控件的名称,请使用类似Spy ++(Win32),UISpy(WinForms ...
  • 如果您要拥有一个网站和一个Web服务,那么我会考虑将数据访问和实体层从MVC中分离出来。 这样,您的Web服务可以执行与您的网站相同的操作。 我会有一个他们都与之交互的服务层。 之后,调用将转到数据库并返回对象,Web服务和网站都不能与此层交互。 这个概念也称为关注点分离 。 您不能/不应该在Web服务中重用MVC控制器。 如果它们非常相似以至于无法区分,那么请考虑将您的网站编写为Web服务的客户端,而不是将其作为同一解决方案的一部分。 If you're going to have a web site ...
  • 看来牛津字典API不支持CORS: 有时,飞行前请求将产生错误消息“No'Access-Control-Allow-Origin'标头出现在所请求的资源上。” 不幸的是,我们无法支持客户端应用程序请求(包括JavaScript,JScript,VBScript,Java小程序,ActionScript等)。 这是因为我们的API目前不支持CORS请求,因为它可能会影响我们服务器的安全性。 相反,我们建议您使查询到达服务器端应用程序,然后从服务器而不是从客户端发送API请求。 资源 所以你需要为离子服务创建一 ...
  • 我担心的是,如果其他人在他们的脚本中包含http://www.example.com/includes/functions.php ,并开始调用我的函数来使用我的凭据进行API调用? functions.php应该在其他地方生活,也许在〜/ public_html目录之外吗? 或者我可以使用UNIX权限来阻止除我自己的应用之外的任何人包含functions.php脚本? 你在这里混淆了很多东西。 长话短说:你不应该担心。 我在这个答案中给出了如何包含URL工作的完整解释。 以下是您的摘要。 具体来说,虽然可 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。