无法在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
最满意答案
你可以使用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 ...
-
从第三方隐藏API密钥?(Hide API key from 3rd party?)[2021-12-24]
我前几天就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工作的完整解释。 以下是您的摘要。 具体来说,虽然可 ...