Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Decrypting Management Reporter Data in SQL

Posted on by 200

I'm looking to pull data from the Management Reporter DataMart for analysis.  As part of this data pull, I presumably need to decrypt the encrypted SQL data in Management Reporter's tables.  Can anyone help me figure out how this can be done using T-SQL?

For example, I'm trying to decrypt data in the CellData column of the ReportLineFinancial table.  I have tried the decryptbycert and decryptbykey functions on the binary version of that column (CAST([CellData] AS varbinary(4000))) and have yet been unsuccessful.  I'm not sure which certificate / key to use to do this.

Thanks for any help you can provide!

*This post is locked for comments

  • Suggested answer
    Redbeard Profile Picture
    Redbeard 12,931 on at
    RE: Decrypting Management Reporter Data in SQL

    Matt,

    Have you considered deploying Dynamics GP Analysis Cubes as a source for the financial data, rather than Management Reporter?

  • mgandley Profile Picture
    mgandley 200 on at
    RE: Decrypting Management Reporter Data in SQL

    So I was able to open the appropriate keys using the following SQL code, however I'm still unable to decrypt the data successfully.

    --Open Connector Service Symmetric Key
    OPEN SYMMETRIC KEY ConnectorServiceSymmetricKey
    DECRYPTION BY CERTIFICATE ConnectorServiceCertificate
    --Open General User Symmetric Key
    OPEN SYMMETRIC KEY GeneralUserSymmetricKey
    DECRYPTION BY CERTIFICATE GeneralUserCertificate
    --Doesn't decrypt the data, returns all null
    SELECT 
    CellData,
    CAST(CellData AS Binary(8000)) AS BinaryCellData,
    CAST(DECRYPTBYKEY(CAST(CellData AS Binary(8000))) AS Varchar(255)) AS Data
    FROM vReportLineFinancial
    --Close open symmetric encryption keys.
    CLOSE SYMMETRIC KEY ConnectorServiceSymmetricKey
    CLOSE SYMMETRIC KEY GeneralUserSymmetricKey

    Still looking for ideas if anyone has any.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans