Jump to content

Lesson Learned #282: Troubleshooting the element cannot be deployed as the script body is encrypted


Recommended Posts

Guest Jose_Manuel_Jurado
Posted

This time our customer was running into the following error message when attempting to perform an export to a bacpac file "One or more unsupported elements were found in the schema used as part of a data package. Error SQL71564: Error validating element [dbo].[usp_GetData]: The element [dbo].[usp_GetData] cannot be deployed as the script body is encrypted."

 

 

 

635x579vv2.png.6d2bdde856fbec273d2296663c4e51c3.png

 

 

 

Checking this situation, we reviewed the definition of this stored procedure usp_GetData and we found in its definition:

 

 

 

 

 

CREATE OR ALTER PROCEDURE usp_GetData

WITH ENCRYPTION

as

begin

select 1

End

 

 

 

 

 

So, this points to that the stored procedure is with encryption enabled and in order to export the schema to the bacpac we need to decrypt the objects before the bacpac file would be successfully created.

 

 

 

Running the command to decrypt the stored procedure code our customer was able to export the data.

 

 

 

 

 

alter PROCEDURE usp_GetData

as

begin

select 1

End

 

 

 

 

 

 

 

 

Enjoy!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...