Close Menu
    Facebook X (Twitter) Instagram
    Sunday, October 12
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»configmgr»CMPivot»SCCM CMPivot query success but returns no data–account smsdbuser_ReadOnly does not exist

    SCCM CMPivot query success but returns no data–account smsdbuser_ReadOnly does not exist

    Eswar KonetiBy Eswar KonetiAugust 12, 4:00 pm2 Mins Read CMPivot 2,489 Views
    Share
    Facebook Twitter LinkedIn Reddit

    I was recently working on an issue reported by the team on the CMPivot issue.

    CMPivot is a ConfigMgr tool that helps to get access to a real-time state of the devices in your environment. CMPivot tools can be used to run a query on all currently connected devices in the target collection and returns the results.

    The execution of the CMPivot query is successful but it doesn't display any results in the CMPIVOT UI.

    Microsoft has a nice troubleshooting guide on the CMPivot https://docs.microsoft.com/en-us/mem/configmgr/core/servers/manage/cmpivot-tsg

    During the course of the investigation, I can see that the CMPivot query is successful, and data is being processed and inserted into the database but the CMPivot UI is blank.

    CMPivot Query is successful.

    image

    CMPivot query results in the database.

    image

    Script output:

    Next is look at the smsprov.log which reveals the following information.

    image

    *** [42000][15517][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot execute as the database principal because the principal "smsdbuser_ReadOnly" does not exist, this type of principal cannot be impersonated, or you do not have permission. : CMPivot_RunQueryImage

    From the log, it says, the account "smsdbuser_ReadOnly" doesn't exist in the SQL database when executing the CMPivot queries.

    What is this account used for?

    The account ‘smsdbuser_ReadOnly’ is used to read the data from the table CMPivotResult when CMPivotResult portal loads the data in the SQL database which we saw earlier.

    Even though the data from the CMPivot exist in the database but to fetch the data from SQL DB to CMPivot UI, you need this account with read permissions.

    This account is created by the SCCM site automatically during the installation but for some reason this is missing, which requires some investigation on the SQL side.

    To fix this issue, re-create the account and granted read-only access to the database.

    image

    Read more about CMPivot

    https://docs.microsoft.com/en-us/mem/configmgr/core/servers/manage/cmpivot

    https://docs.microsoft.com/en-us/mem/configmgr/core/servers/manage/cmpivot-tsg

    clientaction cmpivot cmpivotstatus configmgr database principal Query SCCM smsdbuser_ReadOnly smsprov.log
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Optimize Your Intune Workflow with a Powerful Browser Extension

    March 22, 10:39 am

    Migrate Microsoft 365 Updates from SCCM/MECM to Intune for Co-Managed Devices

    February 11, 9:50 pm

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.