question

PriyaJha-3992 avatar image
0 Votes"
PriyaJha-3992 asked ·

Encrypted varbinary value is not getting inserted in an azure synapse table

Hi All,

I have a temp table in Azure Synapse with the following code:

create TABLE #secrets
(
[c1] varbinary(8000) NULL
)

I have created a certificate and a key and trying to insert encrypted value in this table

OPEN SYMMETRIC KEY TestCertKey
DECRYPTION BY CERTIFICATE TestCert;

insert into #secrets
select ENCRYPTBYKEY(KEY_GUID('TestCertKey'),'TestValue')

When i check the output of select statement i am getting the encrypted varbinary record:

select ENCRYPTBYKEY(KEY_GUID('TestCertKey'),'TestValue') - Output: 0x00172AC940B5E343952A5FFAB50E8137020000003564FB35C4DEF4BD8EBBD9598513836A8D6AB1EB2A1A76FC20D5BC4F934BC9EAF90C52477E966D66AAC8E0DC526B5AB3

But when insert statement is getting executed, NULL value is inserted instead of this varbinary value

The same statement is working fine in Azure SQL DB and other SQL DB's but not working in synapse.

Am i missing something here or something specific related to synapse has to be done?

azure-synapse-analytics
· 3
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@priyajha-3992 Thanks for using Microsoft Q&A !!
I am able to reproduce this and checking internally with the products team. I will get back to you.

0 Votes 0 ·

@priyajha-3992 Sorry for the delay. Our products team is still investigating this issue. I will update you over here as soon as I hear back from them.

0 Votes 0 ·

@priyajha-3992 We have an internal ticket open with the products team for this issue and I am following up internally on the same. I will update you when I get more information over here. Sorry for the inconvenience and appreciate your patience.

0 Votes 0 ·

0 Answers