在Visual Studio 2017中为Azure SQL Dataware house数据库创建SQL Server数据库项目 [英] Creating a SQL Server Database Project in Visual Studio 2017 for Azure SQL Dataware house database

查看:102
本文介绍了在Visual Studio 2017中为Azure SQL Dataware house数据库创建SQL Server数据库项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


所以我有一个Azure SQL数据仓库数据库,我想在Visual Studio 2017中创建一个SQL Server数据库项目。


我在VS 2017中创建了一个空白SQL Server数据库项目,在项目成功创建后,我进入了解决方案资源管理器,属性 - 项目设置 - >目标平台 - > Microsoft SQL Azure数据库V12。之后完成了
我右键单击Project - > Import - > Database。在我指定连接之后,所有数据库对象(如表,存储过程,视图,模式等)都已成功导入。然后我转到Build Menu并单击Build Solution。


现在我收到的错误很少说'必须在数据库范围的凭据之前创建主密钥',我在我的数据库中获得了大约4到5个数据库范围的凭据,我得到了每个数据库范围凭据的上述错误。然后我创建了一个主密钥加密
,如下所示为1个数据库范围的凭据,它解决了1个数据库作用域凭据的上述错误,但我仍然有其他数据库作用域凭据的错误,所以要解决重命名数据库的错误范围凭据我创建了另一个
主密钥,然后我得到并且错误地说'为数据库定义了多个主密钥'。


那么如何解决这些问题/错误?


CREATE MASTER KEY ENCRYPTION

BY PASSWORD ='MyPassw0rdIsComplex'


问候,


Godfrey

解决方案

您好,


是的,数据库只能有一个主密钥范围凭据。


请查看链接以获取更多信息 -  


HTTPS ://docs.microsoft.com/de-de/sql/t-sql/statements/create-database-scoped-credential-transact-sql视图= SQL服务器-2017


Hi All,

So I have a Azure SQL datawarehouse database for which I want to create a SQL Server Database project in Visual Studio 2017.

I created a Blank SQL Server Database project in VS 2017, after the project was created successfully, I then went in the solution explorer, properties -- project settings -->Target Platform -->Microsoft SQL Azure Datbase V12. After that was done then I Right clicked Project -->Import -->Database. All Database objects like tables, stored procs, views, schemas etc were imported successfully after I specified connections etc. I then went to Build Menu and clicked Build Solution.

Now I get few errors saying 'Master Key must be created before a database scoped credential' , I got around 4 to 5 database scoped credentials in my database, I get the above error for every database scoped credential. I then created a Master Key encryption as below for 1 database scoped credential, which resolved the above error for 1 database scoped credential, but I still had errors on other database scoped credentials , so to resolve the errors for the renaming database scoped credentials I created another master key, I then get and error saying 'more than one master key is defined for the database' .

So how do I resolve these issues/errors?

CREATE MASTER KEY ENCRYPTION
BY PASSWORD = 'MyPassw0rdIsComplex'

Regards,

Godfrey

解决方案

Hello,

Yes, there can be only one master key scoped credentials for a database.

Please check the link for more information - 

https://docs.microsoft.com/de-de/sql/t-sql/statements/create-database-scoped-credential-transact-sql?view=sql-server-2017


这篇关于在Visual Studio 2017中为Azure SQL Dataware house数据库创建SQL Server数据库项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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