带有证书的Visual Studio错误SQL71501和SQL71508?
我以前曾见过与用户这样的问题,但从未有证书。我有一个没有密钥的简单证书:
CREATE CERTIFICATE [FOO_EXPORT]
AUTHORIZATION [dbo]
WITH SUBJECT = N'FOO Export', START_DATE = N'2022-05-01T06:12:30', STOP_DATE = N'2032-05-01T06:12:30'
三个数据库中存在相同的证书。对于一个数据库,尽管我的证书没有以前的问题,但我突然开始遇到以下错误。该数据库是唯一使用证书的数据库。它用于签署四个功能。
SQL71501: SqlSignatureEncryptionMechnaism: <unnamed> has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by Signatures.sql
SQL71501: SqlSignatureEncryptionMechnaism: <unnamed> has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by Signatures.sql
SQL71501: SqlSignatureEncryptionMechnaism: <unnamed> has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by Signatures.sql
SQL71501: SqlSignatureEncryptionMechnaism: <unnamed> has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by Signatures.sql
SQL71501: User: [FOO_USER] has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by FOO_USER.sql
SQL71508: The model already has an element that has the same name FOO_EXPORT. --Thrown by FOO_EXPORT.sql
至于foo_user.sql
是,这很简单:
CREATE USER [FOO_USER] FOR CERTIFICATE [FOO_EXPORT];
我所有三个数据库中都存在一个相同的文件。
signatures.sql
不明显。 对于最后一个错误,这只是四个块
ADD SIGNATURE TO OBJECT::[FOO_SCHEMA].[FUNCTIONNAME]
BY CERTIFICATE [FOO_EXPORT] WITH SIGNATURE = INCOMPREHENSIBLEPASSWORD;
,我已经搜索了高和低的块,但是我看不到对foo_export
的其他相关引用。整个解决方案都有八个参考。其中六个是三个foo_user.sql
和foo_export.sql
我上面显示的文件(三个数据库中的每个)。另外两个仅存在于数据库中,这些数据库没有引发错误:
databaseName.sqlproj(87): <Build Include="Secruirty/FOO_EXPORT.sql" />
otherDatabaseName.sqlproj(188): <Build Include="Secruirty/FOO_EXPORT.sql" />
构建/重建无济于事。除了明显的垃圾外,架构还与每个盒子的盒子进行比较,只声称我缺少用户。让比较更新项目无济于事。该比较声称用户缺少属性,即证书。模式比较说,证书的定义(用户的属性)只是foo_export
,没有任何其他文本。
有什么已知的解决方案吗?
I've seen problems like these with users before, but never with a certificate. I have a simple certificate with no keys:
CREATE CERTIFICATE [FOO_EXPORT]
AUTHORIZATION [dbo]
WITH SUBJECT = N'FOO Export', START_DATE = N'2022-05-01T06:12:30', STOP_DATE = N'2032-05-01T06:12:30'
This same certificate exists in three databases. For one database only I've suddenly begun getting the below errors despite having no prior issues with my certificate. This database is the only one where the certificate is used. It is used to sign four functions.
SQL71501: SqlSignatureEncryptionMechnaism: <unnamed> has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by Signatures.sql
SQL71501: SqlSignatureEncryptionMechnaism: <unnamed> has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by Signatures.sql
SQL71501: SqlSignatureEncryptionMechnaism: <unnamed> has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by Signatures.sql
SQL71501: SqlSignatureEncryptionMechnaism: <unnamed> has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by Signatures.sql
SQL71501: User: [FOO_USER] has an unresolved reference to Certificate [FOO_EXPORT]. --Thrown by FOO_USER.sql
SQL71508: The model already has an element that has the same name FOO_EXPORT. --Thrown by FOO_EXPORT.sql
As for what FOO_USER.sql
is, it's quite simple:
CREATE USER [FOO_USER] FOR CERTIFICATE [FOO_EXPORT];
an identical file for this exists in all three of my databases.
Signatures.sql
is unremarkable. It's just four blocks of
ADD SIGNATURE TO OBJECT::[FOO_SCHEMA].[FUNCTIONNAME]
BY CERTIFICATE [FOO_EXPORT] WITH SIGNATURE = INCOMPREHENSIBLEPASSWORD;
As for the last error, I've searched high and low, but I can see no other relevant references to FOO_EXPORT
. The entire solution has eight references to it. Six of them are the three FOO_USER.sql
and FOO_EXPORT.sql
files that I've shown above (two for each of the three databases). The other two only exist in the databases that aren't throwing the error:
databaseName.sqlproj(87): <Build Include="Secruirty/FOO_EXPORT.sql" />
otherDatabaseName.sqlproj(188): <Build Include="Secruirty/FOO_EXPORT.sql" />
Building/Rebuilding does nothing to help. Aside from obvious junk, schema compares with every box ticked only claim that I'm missing a User. Letting the compare update the project does nothing. The compare claims that the user has a missing property, namely a certificate. The schema compare says that the definition of the certificate (which is a property of the user) is just FOO_EXPORT
with no other text whatsoever.
Is there any known solution to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论