search cancel

Cannot open Data Connector rules with error "Length of the data to decrypt is invalid."

book

Article ID: 173677

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

Cannot open Data Connector rules with error "Length of the data to decrypt is invalid."

Item import failed

Item Import exception : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX = Altiris.Connector.DataSource.OleDbDataSource (2ac421a2-33b8-4663-b953-8e8bd0a28393)

Unable to load the specified item: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX0

Length of the data to decrypt is invalid.

Environment

Moving a Symantec_CMDB database from one server to another like a production to a test environment.

Cause

The password hash for the Data Connector source was created on a different server that cannot be decrypted on the server the database is now attached to

Resolution

To resolve the issue you must get the password hash from the original server and the password hash for the same password from the destination server.  To do this right click on a Data Connector Data source item in the tree that has had the password entered and locate the Password hash.
 
Enter the hash from each server in the location indicated in the query below and run this against the copy of the production database. Make sure not to run it against the production database. 
 
update Item 
set State = replace (cast (State as nvarchar (max)), 
--****Hash from Prod goes here****
'PASSWORD HASH FROM ORIGINAL SERVER HERE', 
--Hash for server attached to goes here
'PASSWORD HASH CREATED ON THE WORKING SERVER HERE'
)
where Guid in 
(
select Guid
from Item 
where state like 
--Hash from prod goes here
'%PASSWORD HASH FROM ORIGINAL SERVER HERE%'
)