[英]SQL Server 2019 External Script Execution Authentication Error on JKS File
I'm attempting to put a POC together that leverages the SQL Server 2019 Extensibility Framework & External Languages feature.我正在尝试将利用 SQL Server 2019 可扩展性框架和外部语言功能的 POC 放在一起。 This enables execution of external languages in SQL Server Stored procedures.
这可以在 SQL 服务器存储过程中执行外部语言。 I've written a JAR file that encrypts and decrypts data being passed via a SQL Server stored procedure.
我编写了一个 JAR 文件,该文件加密和解密通过 SQL 服务器存储过程传递的数据。 I've confirmed that the each method is correct, and returns the correct values when not being sent as a stored procedure.
我已经确认每个方法都是正确的,并且在不作为存储过程发送时返回正确的值。 However, when executing the stored procedure I receive an empty data set and see the following error in debug mode:
但是,在执行存储过程时,我收到一个空数据集,并在调试模式下看到以下错误:
java.io.FileNotFoundException: <jks-file-location> (Access is denied)
The line of Java code throwing the error is below:抛出错误的Java代码行如下:
Key _key = readKeyFromStore_cbs("<jks-file-location>, "<password>".toCharArray(), "entityEncryption", "<password>".toCharArray());
_keySpec = new SecretKeySpec(_key.getEncoded(), _key.getAlgorithm());
Again, the code is fine, I don't think there are issues there, and don't think posting the content of those methods is the issue (the SP itself runs fine with dummy data in the place of data being encrypted and decrypted, and the code with encryption and decryption runs as expected when run on its own).同样,代码很好,我认为那里没有问题,并且不认为发布这些方法的内容是问题(SP 本身运行良好,使用虚拟数据代替数据被加密和解密,并且带有加密和解密的代码在单独运行时按预期运行)。
Additional Info:附加信息:
sp_configure
options as well.sp_configure
选项。 The stored procedure runs, but is returning an empty data set.存储过程运行,但返回一个空数据集。 When attempting run without encryption (using the key from the currently inaccessible keystore) and using dummy data, I receive the expected data set.
当尝试不加密运行(使用当前无法访问的密钥库中的密钥)并使用虚拟数据时,我收到了预期的数据集。
Anyone know what might be causing this error?任何人都知道可能导致此错误的原因是什么?
UPDATE: Moving the JAR and jks into SQL Server directories and starting the Launchpad service resolved the issue.更新:将 JAR 和 jks 移动到 SQL 服务器目录并启动 Launchpad 服务解决了该问题。 Hope this helps someone avoid similar frustrations.
希望这可以帮助某人避免类似的挫败感。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.