0

I have encrypted a column in Azure SQL Database and now when a proc which has used temp table and being used to UPDATE/INSERT data into always encrypted table. The exception detail is

Msg 33293 Level 16 Cannot find the column encryption key because it does not exists or you do not have permission.

I am not able to find the solution of it.

10
  • @Charlieface, For Azure SQL DB, you can not see tempdb. It is valid for Managed Instance.
    – Mr. K
    Commented Jul 8 at 12:17
  • Local or global temp table?
    – J.D.
    Commented Jul 8 at 12:48
  • @J.D. , I am testing on local temp table as of now.
    – Mr. K
    Commented Jul 8 at 14:53
  • What is the end goal? A local temp table is only accessible to the session that spawned it, so seems a little pointless to use an encrypted column. But I could be mis-thinking about the use case.
    – J.D.
    Commented Jul 9 at 2:05
  • @J.D., Ideally we use temp table to hold some intermediate data and do some manipulation on the data and then use for end-goal. And obviously it is being used within session only. This complete step is within a proc where this error is coming.
    – Mr. K
    Commented Jul 9 at 4:16

0