question

AluwaniNethavhakoneBCX-4502 avatar image
0 Votes"
AluwaniNethavhakoneBCX-4502 asked AluwaniNethavhakoneBCX-4502 answered

Performing encryption operations

Mar 24 2021 16:39:16 [Informational] WorkitemExecution: Message:Work item 'Performing encryption operations' started..

Mar 24 2021 16:39:16 [Informational] TaskUpdates: Message:Task: 'Performing encryption operations' -- Status: 'Started' -- Details: 'Task 'Performing encryption operations' started ....'.

Mar 24 2021 16:39:33 [Informational] TaskUpdates: Message:Task: 'Performing encryption operations' -- Status: 'Failed' -- Details: 'Task failed due to following error: Loading source as a script-backed model failed due to the following errors:
Error SQL70590: Must declare the variable or parameter "@count"
'.

Mar 24 2021 16:39:33 [Informational] WorkitemExecution: Message:Work item 'Performing encryption operations' stopped..

Mar 24 2021 16:39:33 [Error] WorkitemExecution: Message:Work item 'Performing encryption operations' did not complete. Details: Loading source as a script-backed model failed due to the following errors:
Error SQL70590: Must declare the variable or parameter "@count"
.

Mar 24 2021 16:39:33 [Informational] Log Closed: Message:Job processing completed.

sql-server-generalwindows-server-powershell
· 2
5 |1600 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.

Maybe you should explain what you are actually doing? Or are people to expect to understand this from the log-file output alone?

0 Votes 0 ·

Am trying to encrypt a column using always encrypted wizard the table got more than 200k records. and the column is a varchar(16).

I also using powershell which fail. and also try yo alter the column which also fail. am using SQL Server 2016 Developer edition.

0 Votes 0 ·
AmeliaGu-msft avatar image
0 Votes"
AmeliaGu-msft answered

Hi AluwanNethavhakoneBCX-4502,

Could you please share us the steps and the powershell script when configuring Always Encrypted?
Please follow this doc to check if there are any unsupported characteristics for the columns and use SSMS 18.8 to configure it.
And please refer to this guide which might help.

Best Regards,
Amelia


5 |1600 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.

AluwaniNethavhakoneBCX-4502 avatar image
0 Votes"
AluwaniNethavhakoneBCX-4502 answered

Hi AmeliaGu-msft

Thanks for prompt respond.

I followed the steps in above link.

Powershell steps.

Import-Module SqlServer
$password = "mypassword"
$sqlConnectionString = "Data Source=mydata;Initial Catalog=myDatabase;User ID=myUser;Password=$password;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;Packet Size=4096;Application Name=`"Microsoft SQL Server Management Studio`""
$smoDatabase = Get-SqlDatabase -ConnectionString $sqlConnectionString
$encryptionChanges = @()
$encryptionChanges += New-SqlColumnEncryptionSettings -ColumnName dbo.BRAC_CUST_ACCT_MOP.CC_NO -EncryptionType Deterministic -EncryptionKey "CEK_Auto1"

Set-SqlColumnEncryption -ColumnEncryptionSettings $encryptionChanges -InputObject $smoDatabase

After the last command i get
81457-power-shell-1.png


Then get this error.
81511-powershell-error.png



5 |1600 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.